aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-18 10:21:34 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-18 10:21:34 -0700
commitefbb329f1a81a778fd853bffee0414c87a1133b3 (patch)
treef4af6bcfbb261c347c7f8276067f607e92aa64c8 /test
parentbbd94eae2b3f5273bb681ff6706f0cd375d8a1ef (diff)
downloadpandoc-efbb329f1a81a778fd853bffee0414c87a1133b3.tar.gz
Groff escaping changes.
- `--ascii` is now turned on automatically for man output, for portability. All man output will be escaped to ASCII. - In T.P.Writers.Groff, `escapeChar`, `escapeString`, and `escapeCode` now take a boolean parameter that selects ascii-only output. This is used by the Ms writer for `--ascii`, instead of doing an extra pass after writing the document. - In ms output without `--ascii`, unicode is used whenever possible (e.g. for double quotes). - A few escapes are changed: e.g. `\[rs]` instead of `\\` for backslash, and `\ga]` instead of `` \` `` for backtick.
Diffstat (limited to 'test')
-rw-r--r--test/command/4550.md2
-rw-r--r--test/command/ascii.md4
-rw-r--r--test/tables.ms8
-rw-r--r--test/writer.man28
-rw-r--r--test/writer.ms46
5 files changed, 44 insertions, 44 deletions
diff --git a/test/command/4550.md b/test/command/4550.md
index 45ed21a00..bf3afce5b 100644
--- a/test/command/4550.md
+++ b/test/command/4550.md
@@ -3,5 +3,5 @@
A ‘simple’ example
^D
.LP
-A \[oq]simple\[cq] example
+A ‘simple’ example
```
diff --git a/test/command/ascii.md b/test/command/ascii.md
index 523baa46c..4956ae14e 100644
--- a/test/command/ascii.md
+++ b/test/command/ascii.md
@@ -17,7 +17,7 @@ pandoc -t man --ascii
äéıå
^D
.PP
-\[u00E4]\[u00E9]\[u0131]\[u00E5]
+\[:a]\['e]\[.i]\[oa]
```
```
@@ -25,7 +25,7 @@ pandoc -t ms --ascii
äéıå
^D
.LP
-\[u00E4]\[u00E9]\[u0131]\[u00E5]
+\[:a]\['e]\[.i]\[oa]
```
```
diff --git a/test/tables.ms b/test/tables.ms
index 90662aaad..6d9138c64 100644
--- a/test/tables.ms
+++ b/test/tables.ms
@@ -135,7 +135,7 @@ T}
.LP
Multiline table with caption:
.PP
-Here\[cq]s the caption. It may span multiple lines.
+Here’s the caption. It may span multiple lines.
.TS
delim(@@) tab( );
cw(10.5n) lw(9.6n) rw(11.4n) lw(24.5n).
@@ -165,7 +165,7 @@ row
T} T{
5.0
T} T{
-Here\[cq]s another one.
+Here’s another one.
Note the blank line between rows.
T}
.TE
@@ -201,7 +201,7 @@ row
T} T{
5.0
T} T{
-Here\[cq]s another one.
+Here’s another one.
Note the blank line between rows.
T}
.TE
@@ -261,7 +261,7 @@ row
T} T{
5.0
T} T{
-Here\[cq]s another one.
+Here’s another one.
Note the blank line between rows.
T}
.TE
diff --git a/test/writer.man b/test/writer.man
index 12b51c071..4fb00e87d 100644
--- a/test/writer.man
+++ b/test/writer.man
@@ -104,7 +104,7 @@ And:
\f[C]
\ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs
-These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{
+These\ should\ not\ be\ escaped:\ \ \[rs]$\ \[rs]\[rs]\ \[rs]>\ \[rs][\ \[rs]{
\f[R]
.fi
.PP
@@ -525,7 +525,7 @@ So is \f[B]\f[BI]this\f[B]\f[R] word.
.PP
So is \f[B]\f[BI]this\f[B]\f[R] word.
.PP
-This is code: \f[C]>\f[R], \f[C]$\f[R], \f[C]\\\f[R], \f[C]\\$\f[R],
+This is code: \f[C]>\f[R], \f[C]$\f[R], \f[C]\[rs]\f[R], \f[C]\[rs]$\f[R],
\f[C]<html>\f[R].
.PP
[STRIKEOUT:This is \f[I]strikeout\f[R].]
@@ -563,11 +563,11 @@ Ellipses\&...and\&...and\&....
.SH LaTeX
.IP \[bu] 2
.IP \[bu] 2
-2 + 2 = 4
+2\[u2005]+\[u2005]2\[u2004]=\[u2004]4
.IP \[bu] 2
-\f[I]x\f[R] ∈ \f[I]y\f[R]
+\f[I]x\f[R]\[u2004]\[mo]\[u2004]\f[I]y\f[R]
.IP \[bu] 2
-\f[I]α\f[R] ∧ \f[I]ω\f[R]
+\f[I]\[*a]\f[R]\[u2005]\[AN]\[u2005]\f[I]\[*w]\f[R]
.IP \[bu] 2
223
.IP \[bu] 2
@@ -575,11 +575,11 @@ Ellipses\&...and\&...and\&....
.IP \[bu] 2
Here\[cq]s some display math:
.RS
-$$\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}$$
+$$\[rs]frac{d}{dx}f(x)=\[rs]lim_{h\[rs]to 0}\[rs]frac{f(x+h)-f(x)}{h}$$
.RE
.IP \[bu] 2
Here\[cq]s one that has a line break in it:
-\f[I]α\f[R] + \f[I]ω\f[R] × \f[I]x\f[R]^2^.
+\f[I]\[*a]\f[R]\[u2005]+\[u2005]\f[I]\[*w]\f[R]\[u2005]\[tmu]\[u2005]\f[I]x\f[R]^2^.
.PP
These shouldn\[cq]t be math:
.IP \[bu] 2
@@ -600,15 +600,15 @@ Here\[cq]s a LaTeX table:
.PP
Here is some unicode:
.IP \[bu] 2
-I hat: Î
+I hat: \[^I]
.IP \[bu] 2
-o umlaut: ö
+o umlaut: \[:o]
.IP \[bu] 2
-section: §
+section: \[sc]
.IP \[bu] 2
-set membership: ∈
+set membership: \[mo]
.IP \[bu] 2
-copyright: ©
+copyright: \[co]
.PP
AT&T has an ampersand in their name.
.PP
@@ -620,9 +620,9 @@ This & that.
.PP
6 > 5.
.PP
-Backslash: \\
+Backslash: \[rs]
.PP
-Backtick: \`
+Backtick: \[ga]
.PP
Asterisk: *
.PP
diff --git a/test/writer.ms b/test/writer.ms
index c81127721..910c76cd4 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\[cq]s markdown test suite.
+Most of them are adapted from John Gruber’s markdown test suite.
.HLINE
.SH 1
Headers
@@ -126,7 +126,7 @@ Paragraphs
.pdfhref O 1 "Paragraphs"
.pdfhref M "paragraphs"
.LP
-Here\[cq]s a regular paragraph.
+Here’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\[cq]s one with a bullet.
+Here’s one with a bullet.
* criminey.
.PP
There should be a hard line break
@@ -210,7 +210,7 @@ And:
\f[C]
\ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs
-These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{
+These\ should\ not\ be\ escaped:\ \ \[rs]$\ \[rs]\[rs]\ \[rs]>\ \[rs][\ \[rs]{
\f[]
.fi
.HLINE
@@ -314,7 +314,7 @@ Item 1, graf one.
.PP
Item 1.
graf two.
-The quick brown fox jumped over the lazy dog\[cq]s back.
+The quick brown fox jumped over the lazy dog’s back.
.RE
.IP " 2." 4
Item 2.
@@ -335,7 +335,7 @@ Tab
.RE
.RE
.LP
-Here\[cq]s another:
+Here’s another:
.IP " 1." 4
First
.IP " 2." 4
@@ -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\[cq]s a simple block:
+Here’s a simple block:
.LP
foo
.LP
@@ -617,7 +617,7 @@ Code:
\f[]
.fi
.LP
-Hr\[cq]s:
+Hr’s:
.HLINE
.SH 1
Inline Markup
@@ -641,7 +641,7 @@ So is \f[B]\f[BI]this\f[B]\f[R] word.
.PP
So is \f[B]\f[BI]this\f[B]\f[R] word.
.PP
-This is code: \f[C]>\f[R], \f[C]$\f[R], \f[C]\\\f[R], \f[C]\\$\f[R],
+This is code: \f[C]>\f[R], \f[C]$\f[R], \f[C]\[rs]\f[R], \f[C]\[rs]$\f[R],
\f[C]<html>\f[R].
.PP
\m[strikecolor]This is \f[I]strikeout\f[R].\m[]
@@ -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\[cq]s?
+`He said, \[lq]I want to go.\[rq]' Were you alive in the 70’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\[em]two \[em] three\[em]four \[em] five.
+Some dashes: one—two — three—four — five.
.PP
-Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999.
+Dashes between numbers: 5–7, 255–66, 1987–1999.
.PP
Ellipses\&...and\&...and\&....
.HLINE
@@ -695,14 +695,14 @@ LaTeX
.IP \[bu] 3
@p@-Tree
.IP \[bu] 3
-Here\[cq]s some display math:
+Here’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\[cq]s one that has a line break in it: @alpha + omega times x sup 2@.
+Here’s one that has a line break in it: @alpha + omega times x sup 2@.
.LP
-These shouldn\[cq]t be math:
+These shouldn’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\[cq]s a LaTeX table:
+Here’s a LaTeX table:
.HLINE
.SH 1
Special Characters
@@ -743,9 +743,9 @@ This & that.
.PP
6 > 5.
.PP
-Backslash: \\
+Backslash: \[rs]
.PP
-Backtick: \`
+Backtick: \[ga]
.PP
Asterisk: *
.PP
@@ -885,22 +885,22 @@ With ampersands
.pdfhref O 2 "With ampersands"
.pdfhref M "with-ampersands"
.LP
-Here\[cq]s a \c
+Here’s a \c
.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \
-- "link with an ampersand in the URL"
\&.
.PP
-Here\[cq]s a link with an amersand in the link text: \c
+Here’s a link with an amersand in the link text: \c
.pdfhref W -D "http://att.com/" -A "\c" \
-- "AT&T"
\&.
.PP
-Here\[cq]s an \c
+Here’s an \c
.pdfhref W -D "/script?foo=1&bar=2" -A "\c" \
-- "inline link"
\&.
.PP
-Here\[cq]s an \c
+Here’s an \c
.pdfhref W -D "/script?foo=1&bar=2" -A "\c" \
-- "inline link in pointy braces"
\&.
@@ -967,7 +967,7 @@ It need not be placed at the end of the document.
.FE
and another.\**
.FS
-Here\[cq]s the long note.
+Here’s the long note.
This one contains multiple blocks.
.PP
Subsequent blocks are indented to show that they belong to the footnote (as