aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-07-12 17:02:06 -0700
committerGitHub <noreply@github.com>2020-07-12 17:02:06 -0700
commitc3b170be1c3c11465e5b0a64b6f59c875323a592 (patch)
treec7a23012a4ead8be5e3765efa7f2560cfcdb58d9 /src/Text/Pandoc/Writers
parent651a3d96c499a27556f6a12591bc04bd4cba7630 (diff)
parent09ea10e2b1d8c746422e1a05562b37db4c71be55 (diff)
downloadpandoc-c3b170be1c3c11465e5b0a64b6f59c875323a592.tar.gz
Merge pull request #6513 from brisad/master
Escape starting periods in ms writer code blocks
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs
index d38b874d4..561053c88 100644
--- a/src/Text/Pandoc/Writers/Ms.hs
+++ b/src/Text/Pandoc/Writers/Ms.hs
@@ -204,7 +204,9 @@ blockToMs opts (CodeBlock attr str) = do
literal ".IP" $$
literal ".nf" $$
literal "\\f[C]" $$
- hlCode $$
+ ((case T.uncons str of
+ Just ('.',_) -> literal "\\&"
+ _ -> mempty) <> hlCode) $$
literal "\\f[]" $$
literal ".fi"
blockToMs opts (LineBlock ls) = do