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

Closed
gpakosz opened this Issue Jun 13, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@gpakosz

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
end

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.

Thanks!

@gettalong gettalong self-assigned this Jul 1, 2015

@gettalong

This comment has been minimized.

Owner

gettalong commented Jul 1, 2015

Okay, I have removed the warning messages altogether.

@gettalong gettalong closed this Jul 1, 2015

gettalong added a commit that referenced this issue Jul 1, 2015

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