Docx reader: Add a comment explaining strNormalize

`normalize` from Text.Pandoc.Shared is more general. In tests, though,
it more than doubles the run time. `strNormalize` does less, but it does
what we need. This comment is added for future maintainability.
This commit is contained in:
Jesse Rosenthal 2014-06-20 10:27:18 -04:00
parent 03af19a7e1
commit 2aa5f58c5b

View file

@ -144,6 +144,10 @@ runElemToString (Tab) = ['\t']
runElemsToString :: [RunElem] -> String
runElemsToString = concatMap runElemToString
--- We use this instead of the more general
--- Text.Pandoc.Shared.normalize for reasons of efficiency. For
--- whatever reason, `normalize` makes a run take almost twice as
--- long. (It does more, but this does what we need)
strNormalize :: [Inline] -> [Inline]
strNormalize [] = []
strNormalize (Str "" : ils) = strNormalize ils