#187 new
Paweł Gościcki

Multi-line blockquote escape not working when odd number of newlines used

Reported by Paweł Gościcki | March 3rd, 2010 @ 05:24 PM

Multi line blockquotes are a very handy feature. This is a small bug, that makes escaping the multiline mode a little broken. You escape the multi-line mode using an explicit block element, like a paragraph.

So the following works:

>> RedCloth.new("bq.. Something.\n\nOther thing.\n\np. This is a paragraph outside the blockquote tag.").to_html
=> "<blockquote>\n<p>Something.</p>\n<p>Other thing.</p>\n</blockquote>\n<p>This is a paragraph outside the blockquote tag.</p>"

But this does not (notice the three newline elements):

>> RedCloth.new("bq.. Something.\n\nOther thing.\n\n\np. This should be a paragraph outside the blockquote tag.").to_html
=> "<blockquote>\n<p>Something.</p>\n<p>Other thing.</p>\n<p>p. This should be a paragraph outside the blockquote tag.</p>\n</blockquote>"

It works for even number of newlines and breaks for odd numbers:

>> RedCloth.new("bq.. Something.\n\nOther thing.\n\n\n\n\np. This should be a paragraph outside the blockquote tag.").to_html
=> "<blockquote>\n<p>Something.</p>\n<p>Other thing.</p>\n<p></p>\n<p>p. This should be a paragraph outside the blockquote tag.</p>\n</blockquote>"

Everything tested on RedCloth v4.2.3

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins

People watching this ticket

Pages