
br tag should accept class atribute
Reported by Paweł Gościcki | September 9th, 2010 @ 06:03 AM
Compare:
>> RedCloth::VERSION
=> 4.2.3
>> RedCloth.new("p(clear). ").to_html
=> "<p class="clear"></p>"
>> RedCloth.new("br(clear). ").to_html
=> "<br />"
Comments and changes to this ticket
-
Paweł Gościcki September 9th, 2010 @ 07:15 AM
This should also generate just a
tag (imo):RedCloth.new("br.").to_html >> "<p>br.</p>"
-
Paweł Gościcki September 9th, 2010 @ 07:15 AM
This should also generate just a <br /> tag (imo):
RedCloth.new("br.").to_html >> "<p>br.</p>"
-
Jesse Storimer January 9th, 2011 @ 12:13 PM
Maybe things have changed, but I only get the
tag:RedCloth::VERSION => 4.2.3 RedCloth.new("br. ").to_html => "
" -
Jesse Storimer January 9th, 2011 @ 12:17 PM
Formatting fail :P
>> RedCloth::VERSION => 4.2.3 >> RedCloth.new("br. ").to_html => "<br />"
-
Jesse Storimer January 9th, 2011 @ 12:20 PM
I wanted to be able to add classes to
tags so I took a stab at doing that for both hr and br tags. Here's what I came up with: https://github.com/jstorimer/redcloth/commit/b1786ad27d87e65c485a.I added the pba() helper for those two tags and added specs to the html spec. Let me know what you think.
-
Jesse Storimer January 9th, 2011 @ 12:21 PM
Wow, formatting fail again, why didn't the preview show that...? Here's what I meant:
I wanted to be able to add classes to hr tags so I took a stab at doing that for both hr and br tags. Here's what I came up with: https://github.com/jstorimer/redcloth/commit/b1786ad27d87e65c485a.
I added the pba() helper for those two tags and added specs to the html spec. Let me know what you think.
-
Paweł Gościcki January 9th, 2011 @ 12:22 PM
Uhm, notice that in my examples there is a lack of a leading space (after the dot), hence different results.
-
Jason Garber January 24th, 2011 @ 09:36 AM
- State changed from new to resolved
Applied your patch, Jesse.
Pawel, I wanted to get it to work without the trailing space, but I was unsuccessful.
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.
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