[ANN] Release of RedCloth 4.0.0

Jason Garber jg at jasongarber.com
Wed Jul 23 14:50:01 EDT 2008


Hey, Gerald. I should have provided an example.  Sorry about that.   
Let me give a little explanation for everyone's benefit:

All the inline modifiers can be made a little more explicit by  
surrounding them with square brackets.  So, if you want to make a link  
to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language) 
, you can't get the last character of the link because how would  
RedCloth know if the link ended with a parenthesis or you just  
surrounded a link in parentheses (like "this":http://redcloth.org/)?   
Square brackets to the rescue: ["Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language) 
] works perfectly.

Same with your strikethrough: surrounding the strikethrough with  
square brackets makes it work:
$ redcloth
h1. [-vendor/plugins-] gems
outputs:
<h1><del>vendor/plugins</del> gems</h1>

Yes, it's annoying and it doesn't conform to Textile 2, but it saves a  
lot of frustration over things being accidentally struck through,  
which happened a lot with the old version.  Try this with RedCloth 3.x:
If I use dashes--like this--to make my statement, it used to get  
struck through.
and you'll get
<p>If I use dashes-<del>like this</del>-to make my statement, it used  
to get struck through.</p>

As I said in the ticket, if someone can come up with a patch that  
doesn't sabotage normal text-with-hyphens, I'd be glad to accept it!

Thanks,
Jason

On Jul 23, 2008, at 2:31 PM, Gerald Bauer wrote:

> Hello,
>
>> Gerald, I've filed your bug report as a ticket here:
>> http://jgarber.lighthouseapp.com/projects/13054-redcloth/tickets/20-strikethrough-in-h1-not-working
>
>  Thanks for adding the ticket and looking into it. Just a little
> addition. I did some more testing and found the strikethrough won't
> get honored only if it starts out e.g.:
>
> h1.  -vendor/plugins-  gems
>
> -vendor/plugins- gems
>
> Won't work. But:
>
> h1. yada yada -vendor/plugins- gems
>
> yada yada -vendor/plugins- gems
>
> Will work.
>
> In the ticket you write: "You can use square brackets to force a  
> strikethrough."
>
> I'd appreciate if you can give an example as I am unclear how to
> force a strikethrough (e.g. do you mean using just html e.g.  h1.
> <del>vendor/plugins</del>).
>
>  Again thanks for your efforts in getting RedCloth 4.0.0 out the  
> door. Cheers.
>
> -- 
> Gerald Bauer - Internet Professional - http:// 
> geraldbauer.wordpress.com
> _______________________________________________
> Redcloth-upwards mailing list
> Redcloth-upwards at rubyforge.org
> http://rubyforge.org/mailman/listinfo/redcloth-upwards



More information about the Redcloth-upwards mailing list