Forum: Redcloth Patches for matching opening and closing inline modifiers...

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Tyson Whitehead (Guest)
on 2009-05-06 17:01
(Received via mailing list)
I put together some patches to fix issues with pairing up opening and
inline modifiers.  The new behaviour requires the closing modifier to be
followed by white space (optionally separated by punctuation).  This
things like bug #110.  That is, now"**_snake_case_**").to_html
=> "<p><b><em>snake_case</em></b></p>"

where the middle _ would have matched the leading _ before.

I attached them and sent of an email to the list earlier, but it wound
up in
the holding tanking due to it size, so I added them to bug #110 instead.


Running against the test suite will show that 13 failures.  Two of these
items the previous version did wrong (i.e., now **** ->
and the __ in Amanita__s is not paired with the opening one).  The
are due to it now consistently removing one level of space around - and

This later action is an outcome of the rewrite of the - and -- handlers.
While the old could be obtained with a bit more work, I'm not sure this
actually desirable.  The new behaviour is consistent between en and em
it is closer to what gives, it is what my editor claims is
correct, and makes it possible to not get en dash space (e.g., 1993 -

Cheers!  -Tyson
C4a4cc53f32037a1315a2c6ada011a2e?d=identicon&s=25 Jason G. (jgarber)
on 2009-05-07 14:40
(Received via mailing list)
Thanks, Tyson. I'm finishing off a big Radiant extension and then I'll
get back to tending to RedCloth and apply your patches. Thanks so much!

Sent from my iPod

On May 6, 2009, at 10:52 AM, Tyson Whitehead <>
This topic is locked and can not be replied to.