From 8efb8975ed641ddd075954e1ccc7f71eca1d3c16 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 23 Oct 2018 21:38:21 -0700 Subject: Groff writer character escaping changes. T.P.GroffChar: replaced `essentialEscapes` with `manEscapes`, which includes all the escapes mentioned in the groff_man manual. T.P.Writers.Groff: removed escapeCode; changed parameter on escapeString from Bool to new type `EscapeMode`. Rewrote `escapeString`. --- test/writer.ms | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'test/writer.ms') diff --git a/test/writer.ms b/test/writer.ms index 40ecddb27..0cb60a3bc 100644 --- a/test/writer.ms +++ b/test/writer.ms @@ -75,7 +75,7 @@ July 17, 2006 .1C .LP This is a set of tests for pandoc. -Most of them are adapted from John Gruber’s markdown test suite. +Most of them are adapted from John Gruber\[cq]s markdown test suite. .HLINE .SH 1 Headers @@ -126,7 +126,7 @@ Paragraphs .pdfhref O 1 "Paragraphs" .pdfhref M "paragraphs" .LP -Here’s a regular paragraph. +Here\[cq]s a regular paragraph. .PP In Markdown 1.0.0 and earlier. Version 8. @@ -134,7 +134,7 @@ This line turns into a list item. Because a hard\-wrapped line in the middle of a paragraph looked like a list item. .PP -Here’s one with a bullet. +Here\[cq]s one with a bullet. * criminey. .PP There should be a hard line break @@ -314,7 +314,7 @@ Item 1, graf one. .PP Item 1. graf two. -The quick brown fox jumped over the lazy dog’s back. +The quick brown fox jumped over the lazy dog\[cq]s back. .RE .IP " 2." 4 Item 2. @@ -335,7 +335,7 @@ Tab .RE .RE .LP -Here’s another: +Here\[cq]s another: .IP " 1." 4 First .IP " 2." 4 @@ -431,7 +431,7 @@ Nested. .LP Should not be a list item: .PP -M.A.\~2007 +M.A.\ 2007 .PP B. Williams @@ -570,7 +570,7 @@ Interpreted markdown in a table: This is \f[I]emphasized\f[R] And this is \f[B]strong\f[R] .PP -Here’s a simple block: +Here\[cq]s a simple block: .LP foo .LP @@ -617,7 +617,7 @@ Code: \f[] .fi .LP -Hr’s: +Hr\[cq]s: .HLINE .SH 1 Inline Markup @@ -646,9 +646,9 @@ This is code: \f[C]>\f[R], \f[C]$\f[R], \f[C]\[rs]\f[R], \f[C]\[rs]$\f[R], .PP \m[strikecolor]This is \f[I]strikeout\f[R].\m[] .PP -Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[R]\*} a\*{hello\~there\*}. +Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[R]\*} a\*{hello\ there\*}. .PP -Subscripts: H\*<2\*>O, H\*<23\*>O, H\*O. +Subscripts: H\*<2\*>O, H\*<23\*>O, H\*O. .PP These should not be superscripts or subscripts, because of the unescaped spaces: a\[ha]b c\[ha]d, a\[ti]b c\[ti]d. @@ -666,16 +666,16 @@ Smart quotes, ellipses, dashes `Oak,' `elm,' and `beech' are names of trees. So is `pine.' .PP -`He said, \[lq]I want to go.\[rq]' Were you alive in the 70’s? +`He said, \[lq]I want to go.\[rq]' Were you alive in the 70\[cq]s? .PP Here is some quoted `\f[C]code\f[R]' and a \[lq]\c .pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \ -- "quoted link" \&\[rq]. .PP -Some dashes: one—two — three—four — five. +Some dashes: one\[em]two \[em] three\[em]four \[em] five. .PP -Dashes between numbers: 5–7, 255–66, 1987–1999. +Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999. .PP Ellipses\&...and\&...and\&.... .HLINE @@ -695,14 +695,14 @@ LaTeX .IP \[bu] 3 @p@\-Tree .IP \[bu] 3 -Here’s some display math: +Here\[cq]s some display math: .EQ d over {d x} f ( x ) = lim sub {h -> 0} {f ( x + h ) \[u2212] f ( x )} over h .EN .IP \[bu] 3 -Here’s one that has a line break in it: @alpha + omega times x sup 2@. +Here\[cq]s one that has a line break in it: @alpha + omega times x sup 2@. .LP -These shouldn’t be math: +These shouldn\[cq]t be math: .IP \[bu] 3 To get the famous equation, write \f[C]$e = mc\[ha]2$\f[R]. .IP \[bu] 3 @@ -714,7 +714,7 @@ Shoes ($20) and socks ($5). .IP \[bu] 3 Escaped \f[C]$\f[R]: $73 \f[I]this should be emphasized\f[R] 23$. .LP -Here’s a LaTeX table: +Here\[cq]s a LaTeX table: .HLINE .SH 1 Special Characters @@ -885,22 +885,22 @@ With ampersands .pdfhref O 2 "With ampersands" .pdfhref M "with-ampersands" .LP -Here’s a \c +Here\[cq]s a \c .pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \ -- "link with an ampersand in the URL" \&. .PP -Here’s a link with an amersand in the link text: \c +Here\[cq]s a link with an amersand in the link text: \c .pdfhref W -D "http://att.com/" -A "\c" \ -- "AT&T" \&. .PP -Here’s an \c +Here\[cq]s an \c .pdfhref W -D "/script?foo=1&bar=2" -A "\c" \ -- "inline link" \&. .PP -Here’s an \c +Here\[cq]s an \c .pdfhref W -D "/script?foo=1&bar=2" -A "\c" \ -- "inline link in pointy braces" \&. @@ -925,7 +925,7 @@ It should. .LP An e\-mail address: \c .pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \ - -- "nobody\[at]nowhere.net" + -- "nobody@nowhere.net" \& .RS .LP @@ -967,7 +967,7 @@ It need not be placed at the end of the document. .FE and another.\** .FS -Here’s the long note. +Here\[cq]s the long note. This one contains multiple blocks. .PP Subsequent blocks are indented to show that they belong to the footnote (as -- cgit v1.2.3