git.iko.soy/typeable/pandoc
on master help sign in
Man/Ms writers: don't escape `-` as `\-`.

For discussion see https://groups.google.com/forum/#!msg/pandoc-discuss/B-oiCXcQOVo/WO-BXVpICAAJ The `\-` gets rendered in HTML and PDF as a unicode minus sign.

commitee60ba5252360d2efbf9cf30197236a21a15a924 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 13 Dec 2018, 11:24 (8 years ago) parente4340b3
3 files changed+19−20
src/Text/Pandoc/RoffChar.hs−1 test/writer.man+10−10 test/writer.ms+9−9
src/Text/Pandoc/RoffChar.hs−1
@@ -53,7 +53,6 @@ standardEscapes =
5353 , ('`', "\\[ga]")
5454 , ('^', "\\[ha]")
5555 , ('~', "\\[ti]")
56− , ('-', "\\-") -- minus; - will be interpreted as hyphen U+2010
5756 , ('\\', "\\[rs]")
5857 , ('@', "\\[at]") -- because we use @ as a table and math delimiter
5958 , ('\x2026', "\\&...") -- because u2026 doesn't render on tty
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];
@@ -454,7 +454,7 @@ Code block:
454454.IP
455455.nf
456456\f[C]
457−<!\-\- Comment \-\->
457+<!-- Comment -->
458458\f[R]
459459.fi
460460.PP
@@ -533,11 +533,11 @@ Ellipses\&...and\&...and\&....
533533.IP \[bu] 2
534534223
535535.IP \[bu] 2
536−\f[I]p\f[R]\-Tree
536+\f[I]p\f[R]-Tree
537537.IP \[bu] 2
538538Here\[cq]s some display math:
539539.RS
540−$$\[rs]frac{d}{dx}f(x)=\[rs]lim_{h\[rs]to 0}\[rs]frac{f(x+h)\-f(x)}{h}$$
540+$$\[rs]frac{d}{dx}f(x)=\[rs]lim_{h\[rs]to 0}\[rs]frac{f(x+h)-f(x)}{h}$$
541541.RE
542542.IP \[bu] 2
543543Here\[cq]s one that has a line break in it:
@@ -602,7 +602,7 @@ Left paren: (
602602.PP
603603Right paren: )
604604.PP
605−Greater\-than: >
605+Greater-than: >
606606.PP
607607Hash: #
608608.PP
@@ -612,7 +612,7 @@ Bang: !
612612.PP
613613Plus: +
614614.PP
615−Minus: \-
615+Minus: -
616616.PP
617617 * * * * *
618618.SH Links
@@ -680,13 +680,13 @@ In a list?
680680.IP \[bu] 2
681681It should.
682682.PP
683−An e\-mail address: <nobody@nowhere.net>
683+An e-mail address: <nobody@nowhere.net>
684684.RS
685685.PP
686686Blockquoted: <http://example.com/>
687687.RE
688688.PP
689−Auto\-links should not occur here: \f[C]<http://example.com/>\f[R]
689+Auto-links should not occur here: \f[C]<http://example.com/>\f[R]
690690.IP
691691.nf
692692\f[C]
test/writer.ms+9−9
@@ -131,7 +131,7 @@ Here\[cq]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\[cq]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\[cq]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]