git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #1790 from mpickering/master
dc16f21John MacFarlane
src/Text/Pandoc/Pretty.hs+1−1
@@ -534,4 +534,4 @@ charWidth c =
534-- | Get real length of string, taking into account combining and double-wide
534-- | Get real length of string, taking into account combining and double-wide
535-- characters.
535-- characters.
536realLength :: String -> Int
536realLength :: String -> Int
537−realLength = sum . map charWidth
537+realLength = foldr (\a b -> charWidth a + b) 0