diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 10:00:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 10:00:08 -0700 |
commit | 1a2a0a3a856cc8cba9be2b565787ea08585da7f1 (patch) | |
tree | 56f5c6f18d8bfafd44832251c3054715ee5a472f /src/Text/Pandoc/Readers | |
parent | d587558859d85d1006606b280f3592343096966e (diff) | |
parent | f6ae644831aa40f7199ecfc9a1631880639b6312 (diff) | |
download | pandoc-1a2a0a3a856cc8cba9be2b565787ea08585da7f1.tar.gz |
Merge pull request #1357 from jkr/bottomUpStrNormalize
Make strNormalize go bottomUp.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index 8a8bc46a6..479a88161 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -159,14 +159,14 @@ stripSpaces ils = reverse $ dropWhile (Space ==) $ reverse $ dropWhile (Space ==) ils blockNormalize :: Block -> Block -blockNormalize (Plain ils) = Plain $ strNormalize $ stripSpaces ils -blockNormalize (Para ils) = Para $ strNormalize $ stripSpaces ils +blockNormalize (Plain ils) = Plain $ bottomUp strNormalize $ stripSpaces ils +blockNormalize (Para ils) = Para $ bottomUp strNormalize $ stripSpaces ils blockNormalize (Header n attr ils) = - Header n attr $ strNormalize $ stripSpaces ils + Header n attr $ bottomUp strNormalize $ stripSpaces ils blockNormalize (Table ils align width hdr cells) = - Table (strNormalize $ stripSpaces ils) align width hdr cells + Table (bottomUp strNormalize $ stripSpaces ils) align width hdr cells blockNormalize (DefinitionList pairs) = - DefinitionList $ map (\(ils, blklsts) -> (strNormalize (stripSpaces ils), blklsts)) pairs + DefinitionList $ map (\(ils, blklsts) -> (bottomUp strNormalize (stripSpaces ils), blklsts)) pairs blockNormalize blk = blk runToInlines :: ReaderOptions -> Docx -> Run -> [Inline] |