Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline HTML extension in Markdown generator not working #914

Open
sawshep opened this issue Aug 10, 2022 · 2 comments
Open

Inline HTML extension in Markdown generator not working #914

sawshep opened this issue Aug 10, 2022 · 2 comments

Comments

@sawshep
Copy link

sawshep commented Aug 10, 2022

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 &lt;time&gt;2022-09-08&lt;/time&gt;.

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>&lt;time&gt;2022-09-08&lt;/time&gt; hello there!</p>\n"
@nobu
Copy link
Member

nobu commented Aug 10, 2022

I don't think <time> is a valid HTML tag.

@nobu
Copy link
Member

nobu commented Aug 10, 2022

Sorry, I didn't know it was added by HTML 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants