lib: credit pandoc for the charWidth function

This commit is contained in:
Simon Michael 2015-10-29 09:19:20 -07:00
parent b48ee2d22e
commit 76ab5df833

View File

@ -346,7 +346,7 @@ strWidth s = maximum $ map (foldr (\a b -> charWidth a + b) 0) $ lines s
-- | Get the designated render width of a character: 0 for a combining
-- character, 1 for a regular character, 2 for a wide character.
-- (Wide characters are rendered as exactly double width in apps and
-- fonts that support it.)
-- fonts that support it.) (From Pandoc.)
charWidth :: Char -> Int
charWidth c =
case c of