git.iko.soy/typeable/pandoc
on master help sign in
GroffChar: fixed interpretation of `\-`.

It is the ascii - sign, not the unicode hyphen.

commit7d5b25d6d65306b1f2eb77417a9010951d1e17a8 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 18 Oct 2018, 23:47 (8 years ago) parent00b0c4a
3 files changed+20−20
src/Text/Pandoc/GroffChar.hs+1−1 test/writer.man+10−10 test/writer.ms+9−9
src/Text/Pandoc/GroffChar.hs+1−1
@@ -48,8 +48,8 @@ essentialEscapes = Map.fromList
4848 , ('^', "\\[ha]")
4949 , ('@', "\\[at]")
5050 , ('\\', "\\[rs]")
51+ , ('-', "\\-") -- minus; - will be interpreted as hyphen U+2010
5152 , ('\x2026', "\\&...") -- because u2026 doesn't render on tty
52− , ('\x2212', "\\-") -- minus
5353 ]
5454
5555characterCodes :: [(Char, String)]
test/writer.man+10−10
@@ -27,7 +27,7 @@ Here\[cq]s a regular paragraph.
2727In Markdown 1.0.0 and earlier.
2828Version 8.
2929This line turns into a list item.
30−Because a hard-wrapped line in the middle of a paragraph looked like a list
30+Because a hard\-wrapped line in the middle of a paragraph looked like a list
3131item.
3232.PP
3333Here\[cq]s one with a bullet.
@@ -42,7 +42,7 @@ here.
4242 * * * * *
4343.SH Block Quotes
4444.PP
45−E-mail style:
45+E\-mail style:
4646.RS
4747.PP
4848This is a block quote.
@@ -88,7 +88,7 @@ Code:
8888.IP
8989.nf
9090\f[C]
91−----\ (should\ be\ four\ hyphens)
91+\-\-\-\-\ (should\ be\ four\ hyphens)
9292
9393sub\ status\ {
9494\ \ \ \ print\ \[dq]working\[dq];
@@ -492,7 +492,7 @@ Code block:
492492.IP
493493.nf
494494\f[C]
495−<!--\ Comment\ -->
495+<!\-\-\ Comment\ \-\->
496496\f[R]
497497.fi
498498.PP
@@ -571,11 +571,11 @@ Ellipses\&...and\&...and\&....
571571.IP \[bu] 2
572572223
573573.IP \[bu] 2
574−\f[I]p\f[R]-Tree
574+\f[I]p\f[R]\-Tree
575575.IP \[bu] 2
576576Here\[cq]s some display math:
577577.RS
578−$$\[rs]frac{d}{dx}f(x)=\[rs]lim_{h\[rs]to 0}\[rs]frac{f(x+h)-f(x)}{h}$$
578+$$\[rs]frac{d}{dx}f(x)=\[rs]lim_{h\[rs]to 0}\[rs]frac{f(x+h)\-f(x)}{h}$$
579579.RE
580580.IP \[bu] 2
581581Here\[cq]s one that has a line break in it:
@@ -640,7 +640,7 @@ Left paren: (
640640.PP
641641Right paren: )
642642.PP
643−Greater-than: >
643+Greater\-than: >
644644.PP
645645Hash: #
646646.PP
@@ -650,7 +650,7 @@ Bang: !
650650.PP
651651Plus: +
652652.PP
653−Minus: -
653+Minus: \-
654654.PP
655655 * * * * *
656656.SH Links
@@ -718,13 +718,13 @@ In a list?
718718.IP \[bu] 2
719719It should.
720720.PP
721−An e-mail address: <nobody@nowhere.net>
721+An e\-mail address: <nobody@nowhere.net>
722722.RS
723723.PP
724724Blockquoted: <http://example.com/>
725725.RE
726726.PP
727−Auto-links should not occur here: \f[C]<http://example.com/>\f[R]
727+Auto\-links should not occur here: \f[C]<http://example.com/>\f[R]
728728.IP
729729.nf
730730\f[C]
test/writer.ms+9−9
@@ -131,7 +131,7 @@ Here’s a regular paragraph.
131131In Markdown 1.0.0 and earlier.
132132Version 8.
133133This line turns into a list item.
134−Because a hard-wrapped line in the middle of a paragraph looked like a list
134+Because a hard\-wrapped line in the middle of a paragraph looked like a list
135135item.
136136.PP
137137Here’s one with a bullet.
@@ -146,7 +146,7 @@ Block Quotes
146146.pdfhref O 1 "Block Quotes"
147147.pdfhref M "block-quotes"
148148.LP
149−E-mail style:
149+E\-mail style:
150150.RS
151151.LP
152152This is a block quote.
@@ -194,7 +194,7 @@ Code:
194194.IP
195195.nf
196196\f[C]
197−----\ (should\ be\ four\ hyphens)
197+\-\-\-\-\ (should\ be\ four\ hyphens)
198198
199199sub\ status\ {
200200\ \ \ \ print\ \[dq]working\[dq];
@@ -603,7 +603,7 @@ Code block:
603603.IP
604604.nf
605605\f[C]
606−<!--\ Comment\ -->
606+<!\-\-\ Comment\ \-\->
607607\f[]
608608.fi
609609.LP
@@ -693,7 +693,7 @@ LaTeX
693693.IP \[bu] 3
694694@223@
695695.IP \[bu] 3
696−@p@-Tree
696+@p@\-Tree
697697.IP \[bu] 3
698698Here’s some display math:
699699.EQ
@@ -763,7 +763,7 @@ Left paren: (
763763.PP
764764Right paren: )
765765.PP
766−Greater-than: >
766+Greater\-than: >
767767.PP
768768Hash: #
769769.PP
@@ -773,7 +773,7 @@ Bang: !
773773.PP
774774Plus: +
775775.PP
776−Minus: -
776+Minus: \-
777777.HLINE
778778.SH 1
779779Links
@@ -923,7 +923,7 @@ In a list?
923923.IP \[bu] 3
924924It should.
925925.LP
926−An e-mail address: \c
926+An e\-mail address: \c
927927.pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \
928928 -- "nobody\[at]nowhere.net"
929929\&
@@ -935,7 +935,7 @@ Blockquoted: \c
935935\&
936936.RE
937937.LP
938−Auto-links should not occur here: \f[C]<http://example.com/>\f[R]
938+Auto\-links should not occur here: \f[C]<http://example.com/>\f[R]
939939.IP
940940.nf
941941\f[C]