[kramdown-users] possible bug: kramdown wrapping <br> in <p>
Shawn Van Ittersum
svicalifornia at gmail.com
Wed Aug 11 09:26:51 EDT 2010
I thought that there was a requirement for a blank line before all paragraphs? This is clearly a contiguous block of HTML, and kramdown should leave HTML alone, as Markdown does.
Matt, what does Markdown do when parsing this input?
On Tue, 10 Aug 2010 11:31:07 +0200, Thomas Leitner wrote:
> On 2010-08-09 18:52 -0700 Matt Neuburg wrote:
>> require 'kramdown'
>> s = <<END
>> <br />
>> puts Kramdown::Document.new(s).to_html
>> The result is:
>> <p><br /></p>
>> This feels like a possible bug. m.
> It isn't. The `<div></div>` parts before and after the `<br />` are
> parsed with the block HTML parser, the `<br />` is no block HTML
> element (like `<a>`), and therefore this line is parsed with the
> paragraph parser.
> -- Thomas
> kramdown-users mailing list
> kramdown-users at rubyforge.org
More information about the kramdown-users