From 86d8e1ef8957b4a7809872189b626013e51bd3ab Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 23 Feb 2017 09:54:31 +0100
Subject: [PATCH] Pretty: simplified definition of realLength.

---
 src/Text/Pandoc/Pretty.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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