git.iko.soy/typeable/pandoc
on master help sign in
Ms writer: don't escape hyphens.

Previously we escaped hyphens as `\-`, but that's a minus sign. Closes #4467. Updated changelog.

commit3d21c184d47b17fa8b7213ed7014703214268292 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 18 Mar 2018, 14:50 (9 years ago) parent0ef5665
3 files changed+15−13
changelog+6−3 src/Text/Pandoc/Writers/Ms.hs−1 test/writer.ms+9−9
changelog+6−3
@@ -59,9 +59,12 @@ pandoc (2.1.3)
5959
6060 * Dokuwiki writer: fix LineBreaks in Tables (#4313, Mauro Bieg).
6161
62− * Ms writer: asciify pdf anchors, since unicode anchors don't work (#4436).
63− Internal links should be converted automatically, so this shouldn't affect
64− users directly.
62+ * Ms writer:
63+
64+ + Asciify pdf anchors, since unicode anchors don't work (#4436).
65+ Internal links should be converted automatically, so this shouldn't
66+ affect users directly.
67+ + Don't escape hyphens as `\-`; that's for a minus sign (#4467).
6568
6669 * Beamer writer: put hyperlink after `\begin{frame}` and not in the title
6770 (#4307). If it's in the title, then we get a titlebar on slides with
src/Text/Pandoc/Writers/Ms.hs−1
@@ -142,7 +142,6 @@ msEscapes = Map.fromList
142142 , ('\x2026', "\\&...")
143143 , ('~', "\\[ti]")
144144 , ('^', "\\[ha]")
145− , ('-', "\\-")
146145 , ('@', "\\@")
147146 , ('\\', "\\\\")
148147 ]
test/writer.ms+9−9
@@ -128,7 +128,7 @@ Here's a regular paragraph.
128128In Markdown 1.0.0 and earlier.
129129Version 8.
130130This line turns into a list item.
131−Because a hard\-wrapped line in the middle of a paragraph looked like a list
131+Because a hard-wrapped line in the middle of a paragraph looked like a list
132132item.
133133.PP
134134Here's one with a bullet.
@@ -143,7 +143,7 @@ Block Quotes
143143.pdfhref O 1 "Block Quotes"
144144.pdfhref M "block-quotes"
145145.LP
146−E\-mail style:
146+E-mail style:
147147.RS
148148.LP
149149This is a block quote.
@@ -191,7 +191,7 @@ Code:
191191.IP
192192.nf
193193\f[C]
194−\-\-\-\-\ (should\ be\ four\ hyphens)
194+----\ (should\ be\ four\ hyphens)
195195
196196sub\ status\ {
197197\ \ \ \ print\ \[dq]working\[dq];
@@ -600,7 +600,7 @@ Code block:
600600.IP
601601.nf
602602\f[C]
603−<!\-\-\ Comment\ \-\->
603+<!--\ Comment\ -->
604604\f[]
605605.fi
606606.LP
@@ -690,7 +690,7 @@ LaTeX
690690.IP \[bu] 3
691691@223@
692692.IP \[bu] 3
693−@p@\-Tree
693+@p@-Tree
694694.IP \[bu] 3
695695Here's some display math:
696696.EQ
@@ -760,7 +760,7 @@ Left paren: (
760760.PP
761761Right paren: )
762762.PP
763−Greater\-than: >
763+Greater-than: >
764764.PP
765765Hash: #
766766.PP
@@ -770,7 +770,7 @@ Bang: !
770770.PP
771771Plus: +
772772.PP
773−Minus: \-
773+Minus: -
774774.HLINE
775775.SH 1
776776Links
@@ -920,7 +920,7 @@ In a list?
920920.IP \[bu] 3
921921It should.
922922.LP
923−An e\-mail address: \c
923+An e-mail address: \c
924924.pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \
925925 -- "nobody\@nowhere.net"
926926\&
@@ -932,7 +932,7 @@ Blockquoted: \c
932932\&
933933.RE
934934.LP
935−Auto\-links should not occur here: \f[C]<http://example.com/>\f[]
935+Auto-links should not occur here: \f[C]<http://example.com/>\f[]
936936.IP
937937.nf
938938\f[C]