aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-22 15:37:08 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-22 15:37:08 +0100
commitc59e31722471ce3a67a41413de4e6a5ecfd00ba1 (patch)
tree6999e4850cab31123a9746151ded3e2b2b595124
parent0e68c559555a8450efe43850bb2dbad1a0d99d83 (diff)
downloadpandoc-c59e31722471ce3a67a41413de4e6a5ecfd00ba1.tar.gz
Experimental change to charWidth in Pretty.
Hunch that this might help with #3526.
-rw-r--r--src/Text/Pandoc/Pretty.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs
index 32e60843c..73d698001 100644
--- a/src/Text/Pandoc/Pretty.hs
+++ b/src/Text/Pandoc/Pretty.hs
@@ -511,6 +511,7 @@ doubleQuotes = inside (char '"') (char '"')
-- | Returns width of a character in a monospace font: 0 for a combining
-- character, 1 for a regular character, 2 for an East Asian wide character.
charWidth :: Char -> Int
+charWidth '\r' = 0
charWidth c =
case c of
_ | c < '\x0300' -> 1