git.iko.soy/typeable/pandoc
on master help sign in
Textile writer: escape `+` and `-` as entities.

Closes #2225.

commit7df4d86006c42db3e2cc68c09993f7f83cca7107 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 27 Jun 2015, 20:30 (11 years ago) parentfce3ebb
2 files changed+10−8
src/Text/Pandoc/Writers/Textile.hs+2 tests/writer.textile+8−8
src/Text/Pandoc/Writers/Textile.hs+2
@@ -85,6 +85,8 @@ escapeCharForTextile x = case x of
8585 '*' -> "&#42;"
8686 '_' -> "&#95;"
8787 '@' -> "&#64;"
88+ '+' -> "&#43;"
89+ '-' -> "&#45;"
8890 '|' -> "&#124;"
8991 '\x2014' -> " -- "
9092 '\x2013' -> " - "
tests/writer.textile+8−8
@@ -30,7 +30,7 @@ h1(#paragraphs). Paragraphs
3030
3131Here's a regular paragraph.
3232
33−In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.
33+In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard&#45;wrapped line in the middle of a paragraph looked like a list item.
3434
3535Here's one with a bullet. &#42; criminey.
3636
@@ -41,7 +41,7 @@ here.
4141
4242h1(#block-quotes). Block Quotes
4343
44−E-mail style:
44+E&#45;mail style:
4545
4646bq. This is a block quote. It is pretty short.
4747
@@ -527,7 +527,7 @@ h1(#latex). LaTeX
527527* <span class="math">x \in y</math>
528528* <span class="math">\alpha \wedge \omega</math>
529529* <span class="math">223</math>
530−* <span class="math">p</math>-Tree
530+* <span class="math">p</math>&#45;Tree
531531* Here's some display math: <span class="math">\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
532532* Here's one that has a line break in it: <span class="math">\alpha + \omega \times x^2</math>.
533533
@@ -583,7 +583,7 @@ Left paren: (
583583
584584Right paren: )
585585
586−Greater-than: &gt;
586+Greater&#45;than: &gt;
587587
588588Hash: #
589589
@@ -591,9 +591,9 @@ Period: .
591591
592592Bang: !
593593
594−Plus: +
594+Plus: &#43;
595595
596−Minus: -
596+Minus: &#45;
597597
598598<hr />
599599
@@ -664,13 +664,13 @@ With an ampersand: "$":http://example.com/?foo=1&bar=2
664664* "$":http://example.com/
665665* It should.
666666
667−An e-mail address: "nobody&#64;nowhere.net":mailto:nobody@nowhere.net
667+An e&#45;mail address: "nobody&#64;nowhere.net":mailto:nobody@nowhere.net
668668
669669bq. Blockquoted: "$":http://example.com/
670670
671671
672672
673−Auto-links should not occur here: @<http://example.com/>@
673+Auto&#45;links should not occur here: @<http://example.com/>@
674674
675675bc. or here: <http://example.com/>
676676