aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-23 09:54:31 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-23 09:54:31 +0100
commit86d8e1ef8957b4a7809872189b626013e51bd3ab (patch)
treed3050be3fb8e8e7a3f49be640e9491f4f7bdc2c8
parent9614835ea739de591d313aa4d278a5aa0a999970 (diff)
downloadpandoc-86d8e1ef8957b4a7809872189b626013e51bd3ab.tar.gz
Pretty: simplified definition of realLength.
-rw-r--r--src/Text/Pandoc/Pretty.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs
index 256f38b0c..f0eb88007 100644
--- a/src/Text/Pandoc/Pretty.hs
+++ b/src/Text/Pandoc/Pretty.hs
@@ -554,4 +554,4 @@ charWidth c =
-- | Get real length of string, taking into account combining and double-wide
-- characters.
realLength :: String -> Int
-realLength = foldr (\a b -> charWidth a + b) 0
+realLength = sum . map charWidth