aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-04-12 12:22:25 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-04-12 12:23:29 +0200
commit31a36cf186353dd7c18533b42a88424145b12dcc (patch)
tree6bd56177689a6169607b824670793e8f214cac55 /test
parent7e3705c1c4a7b63ce6818c1e3cb3496ff618ac0f (diff)
downloadpandoc-31a36cf186353dd7c18533b42a88424145b12dcc.tar.gz
Man writer: Fix handling of nested font commands.
Previously pandoc emitted incorrect markup for bold + italic, for example, or bold + code. Closes #3568.
Diffstat (limited to 'test')
-rw-r--r--test/command/3568.md15
-rw-r--r--test/writer.man8
2 files changed, 19 insertions, 4 deletions
diff --git a/test/command/3568.md b/test/command/3568.md
new file mode 100644
index 000000000..e77c27b78
--- /dev/null
+++ b/test/command/3568.md
@@ -0,0 +1,15 @@
+```
+% pandoc -t man
+normal *italic **bold in the middle** only italic* normal.
+
+normal **bold `code` more bold** normal.
+
+normal `code` normal.
+^D
+.PP
+normal \f[I]italic \f[BI]bold in the middle\f[I] only italic\f[] normal.
+.PP
+normal \f[B]bold \f[BC]code\f[B] more bold\f[] normal.
+.PP
+normal \f[C]code\f[] normal.
+```
diff --git a/test/writer.man b/test/writer.man
index b0aece96b..907fb4878 100644
--- a/test/writer.man
+++ b/test/writer.man
@@ -517,13 +517,13 @@ This is \f[B]strong\f[], and so \f[B]is this\f[].
.PP
An \f[I]emphasized link (/url)\f[].
.PP
-\f[B]\f[I]This is strong and em.\f[]\f[]
+\f[B]\f[BI]This is strong and em.\f[B]\f[]
.PP
-So is \f[B]\f[I]this\f[]\f[] word.
+So is \f[B]\f[BI]this\f[B]\f[] word.
.PP
-\f[B]\f[I]This is strong and em.\f[]\f[]
+\f[B]\f[BI]This is strong and em.\f[B]\f[]
.PP
-So is \f[B]\f[I]this\f[]\f[] word.
+So is \f[B]\f[BI]this\f[B]\f[] word.
.PP
This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[],
\f[C]<html>\f[].