[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?
Shawn
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
>> <div>
>> </div>
>> <br />
>> <div>
>> </div>
>> END
>> puts Kramdown::Document.new(s).to_html
>>
>> The result is:
>>
>> <div>
>> </div>
>> <p><br /></p>
>> <div>
>> </div>
>>
>> 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
> http://rubyforge.org/mailman/listinfo/kramdown-users
More information about the kramdown-users
mailing list