Skip to content

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Jan 4, 2026

The Markdown parser correctly parsed ~~text~~ syntax but the AttributeManager did not recognize the resulting formats for HTML conversion:

  • Single words: ~~word~~ -> ~word~ (not registered as word pair)
  • Multi-word: ~~words here~~ -> <s>words here</s> (tag not registered)

Add support for strikethrough formatting:

  • Register ~ as word pair for :STRIKE attribute
  • Register <s>, <del>, and <strike> HTML tags for :STRIKE
  • Add :STRIKE -> <del> tag mapping in ToHtml

All strikethrough input formats now render as <del>text</del> in HTML.

@st0012 st0012 added the bug label Jan 4, 2026
@matzbot
Copy link
Collaborator

matzbot commented Jan 4, 2026

🚀 Preview deployment available at: https://5399d6da.rdoc-6cd.pages.dev (commit: 92b6e13)

The Markdown parser correctly parsed `~~text~~` syntax but the
AttributeManager did not recognize the resulting formats for HTML
conversion:

- Single words: `~~word~~` -> `~word~` (not registered as word pair)
- Multi-word: `~~words here~~` -> `<s>words here</s>` (tag not registered)

Add support for strikethrough formatting:

- Register `~` as word pair for `:STRIKE` attribute
- Register `<s>`, `<del>` HTML tags for `:STRIKE`
- Add `:STRIKE` -> `<del>` tag mapping in `ToHtml`

All strikethrough input formats now render as `<del>text</del>` in HTML.
@st0012 st0012 force-pushed the fix-markdown-strike-issue branch from 53c1b88 to 92b6e13 Compare January 4, 2026 15:26
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@st0012 st0012 merged commit c4a58cb into master Jan 4, 2026
68 checks passed
@st0012 st0012 deleted the fix-markdown-strike-issue branch January 4, 2026 22:12
st0012 added a commit that referenced this pull request Jan 4, 2026
1. README now has a better section about supported markup formats
2. RDoc markup related reference are now consolidated under
`doc/markup_reference/rdoc.rdoc`
3. Markdown markup now has a more comprehensive reference in
`doc/markup_reference/markdown.md`

(#1536, #1538, #1540, and #1541 were all discovered when I was preparing
for this PR 😄)
st0012 added a commit that referenced this pull request Jan 5, 2026
1. GitHub doesn't support `~word~` syntax for strikethrough, so we shouldn't
   either.
2. It's hard to make RDoc markup support `~~word~~` without supporting
   `~word~` as well due to the way attribute manager works. So instead
   we rollback the support added in #1541. Users can still use `<del>text</del>`
   syntax for strikethrough.
3. Fix `<code><del>text</del></code>` not rendering as `<del>text</del>` in HTML output.
4. Update documentation to reflect the new support.
st0012 added a commit that referenced this pull request Jan 5, 2026
1. GitHub doesn't support `~word~` syntax for strikethrough, so we
shouldn't either.
2. It's hard to make RDoc markup support `~~word~~` without supporting
`~word~` as well due to the way attribute manager works. So instead we
rollback the support added in #1541. Users can still use
`<del>text</del>` syntax for strikethrough.
3. Fix `<code><del>text</del></code>` not rendering as `<del>text</del>`
in HTML output.
4. Update documentation to reflect the new support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants