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

Closed
gpakosz opened this issue Jun 13, 2015 · 1 comment
Closed
Assignees

Comments

@gpakosz
Copy link

@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
Copy link
Owner

@gettalong gettalong commented Jul 1, 2015

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants