Ticket #26 (new defect)
RedCloth (3.0.4 and repository) em-dash vs. strikethru bug
| Reported by: | purp | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ext | Version: | 3.0.4 |
| Keywords: | Cc: |
Description
This:
RedCloth.new('more -- chunky -- bacon').to_html
... should return this (according to http://textism.com/tools/textile/index.php):
<p>more—chunky—bacon</p>
Instead, it returns this:
<p>foo <del>- bar -</del> baz</p>
This appears to be due to two things:
1. An order inversion of the inline_textile_span and glyphs_textile methods in the textile_rules array of RedCloth#to_html
2. A bug in RedCloth#inline which causes all inline_* methods to be run before any glyphs_* methods due to the order of the regexes listed in the method's first line.
I'd propose fixing this with the attached patch, made against the r193 of the trunk in svn.
Thanks for the excellent lib!
--j