diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-18 10:21:34 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-18 10:21:34 -0700 |
commit | efbb329f1a81a778fd853bffee0414c87a1133b3 (patch) | |
tree | f4af6bcfbb261c347c7f8276067f607e92aa64c8 /src/Text/Pandoc/GroffChar.hs | |
parent | bbd94eae2b3f5273bb681ff6706f0cd375d8a1ef (diff) | |
download | pandoc-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 'src/Text/Pandoc/GroffChar.hs')
-rw-r--r-- | src/Text/Pandoc/GroffChar.hs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Text/Pandoc/GroffChar.hs b/src/Text/Pandoc/GroffChar.hs index 669b2b4a0..8664c627f 100644 --- a/src/Text/Pandoc/GroffChar.hs +++ b/src/Text/Pandoc/GroffChar.hs @@ -1,4 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2018 John MacFarlane <jgm@berkeley.edu> @@ -400,19 +401,19 @@ characterCodes = -- use like: \\[E a^ aa] combiningAccents :: [(Char, String)] combiningAccents = - [ ('˝' , "\\[a\"]") - , ('¯', "\\[a-]") - , ('˙', "\\[a.]") - , ('^', "\\[a^]") - , ('´', "\\[aa]") - , ('`', "\\[ga]") - , ('˘', "\\[ab]") - , ('¸', "\\[ac]") - , ('¨', "\\[ad]") - , ('ˇ', "\\[ah]") - , ('˚', "\\[ao]") - , ('~', "\\[a~]") - , ('˛', "\\[ho]") - , ('^', "\\[ha]") - , ('~', "\\[ti]") + [ ('˝' , "a\"") + , ('¯', "a-") + , ('˙', "a.") + , ('^', "a^") + , ('´', "aa") + , ('`', "ga") + , ('˘', "ab") + , ('¸', "ac") + , ('¨', "ad") + , ('ˇ', "ah") + , ('˚', "ao") + , ('~', "a~") + , ('˛', "ho") + , ('^', "ha") + , ('~', "ti") ] |