diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-07-12 17:02:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 17:02:06 -0700 |
commit | c3b170be1c3c11465e5b0a64b6f59c875323a592 (patch) | |
tree | c7a23012a4ead8be5e3765efa7f2560cfcdb58d9 /src/Text/Pandoc/Writers | |
parent | 651a3d96c499a27556f6a12591bc04bd4cba7630 (diff) | |
parent | 09ea10e2b1d8c746422e1a05562b37db4c71be55 (diff) | |
download | pandoc-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.hs | 4 |
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 |