Instead of emm-dashes I get struck-out text surrounded with single
hyphens. RedCloth
3.0.4:
d = RedCloth.new “-- hyphens to the left of me, hyphens to the right, all should be emm
dashes --”
=> “-- hyphens to the left of me, hyphens to the right, all should be
emm dashes --”
d.to_html
=> “
- hyphens to the left of me, hyphens to the right, all
should be emm dashes
-
”
There is a limit of one emm-dash per line – ought to document this
restriction.
Instead of emm-dashes I get struck-out text surrounded with single
hyphens. RedCloth
3.0.4:
d = RedCloth.new “-- hyphens to the left of me, hyphens to the right, all should be emm
dashes --”
=> “-- hyphens to the left of me, hyphens to the right, all should be
emm dashes --”
d.to_html
=> “
- hyphens to the left of me, hyphens to the right, all
should be emm dashes
-
”
There is a limit of one emm-dash per line – ought to document this
restriction.
I see no technical reason for this limitation, because the Textism
tool[1] is able to handle more than one emdash per line. For example,
when I entered the above string into the Textism tool, it produced:
<p>—hyphens to the left of me, hyphens to the right, all should
be emm dashes—
In this manner, redcloth deviates from Textism’s implementation of
textile. Thus, please fix this problem, so I can stop using —
entities all over my textile files – making them look like (gasp!)
HTML.
r = RedCloth.new “-- hyphens to the left of me --”
=> “-- hyphens to the left of me --”
r.to_html
=> “
—hyphens to the left of me—
”
3.0.4 is buggy in other places iirc (haven’t used it since I was
tripped
up) - and afaik it’s on the backburner at the moment - stick with 3.0.3,
works fine.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.