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

HTML5 fragments inside markdown content emits warnings for elements without body #262

gpakosz opened this issue Jun 13, 2015 · 1 comment


Copy link

gpakosz commented Jun 13, 2015

Currently, the html parser expects XHTML content and will warn about non-self closing tags without body. E.g. <img> and <br> tags.

if !closed && HTML_ELEMENTS_WITHOUT_BODY.include?(el.value)
  warning("The HTML tag '#{el.value}' on line #{line} cannot have any content - auto-closing it")
  closed = true

in lib/kramdown/parser/html.rb:89

Could we get rid of or have an option to disable that specific warning? I guess nowadays more and more people expect to be able to have fragments of HTML5 inside their markdown documents.


@gettalong gettalong self-assigned this Jul 1, 2015
Copy link

Okay, I have removed the warning messages altogether.

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

Successfully merging a pull request may close this issue.

2 participants