Inline HTML extension in Markdown generator not working
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 930
- Forks
- 465
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 27
Description
I cannot get the inline HTML extension to work with the standalone RDoc Markdown generator. Below is a test using the example from the documentation. The expected output should have <time>2022-09-08</time> instead of <time>2022-09-08</time>.
Here's the full example:
irb(main):002:0> RDoc::Markdown::DEFAULT_EXTENSIONS
=> [:definition_lists, :github, :html, :notes, :strike]
irb(main):003:0> markdown = "<time>2022-09-08</time>\nhello there!"
=> "<time>2022-09-08</time>\nhello there!"
irb(main):004:0> formatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
=>
#<RDoc::Markup::ToHtml:0x00007fd82520a7b0
...
irb(main):005:0> html = RDoc::Markdown.parse(markdown).accept(formatter)
=> "\n<p><time>2022-09-08</time> hello there!</p>\n"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example using RDoc::Markdown.parse with RDoc::Markup::ToHtml and the documented DEFAULT_EXTENSIONS, then trace how the :html extension handles inline tags. Add a regression test showing that 2022-09-08 remains unescaped in the generated output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100