diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-02-23 09:54:31 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-02-23 09:54:31 +0100 |
commit | 86d8e1ef8957b4a7809872189b626013e51bd3ab (patch) | |
tree | d3050be3fb8e8e7a3f49be640e9491f4f7bdc2c8 | |
parent | 9614835ea739de591d313aa4d278a5aa0a999970 (diff) | |
download | pandoc-86d8e1ef8957b4a7809872189b626013e51bd3ab.tar.gz |
Pretty: simplified definition of realLength.
-rw-r--r-- | src/Text/Pandoc/Pretty.hs | 2 |
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 |