diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-28 09:35:43 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-28 09:35:43 -0800 |
commit | 5ba5373ec66dfbafc16e28320851d70e1be46f80 (patch) | |
tree | 5e944ce317eb7456a5233aafb2a5ad55d785b2e7 | |
parent | 219573eed213dd40a405f24e3acfddf9a9ffb379 (diff) | |
download | pandoc-5ba5373ec66dfbafc16e28320851d70e1be46f80.tar.gz |
Shared: Make 'normalize' more generic.
Now it can transform an Inline, [Inline], Block, [Block], or Pandoc.
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 876a2b21b..e40d99207 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -257,7 +257,7 @@ normalizeSpaces = cleanup . dropWhile isSpaceOrEmpty -- | Normalize @Pandoc@ document, consolidating doubled 'Space's, -- combining adjacent 'Str's and 'Emph's, remove 'Null's and -- empty elements, etc. -normalize :: Pandoc -> Pandoc +normalize :: Data a => a -> a normalize = topDown consolidateInlines . bottomUp removeEmptyInlines . topDown removeEmptyBlocks |