From 5ba5373ec66dfbafc16e28320851d70e1be46f80 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 28 Jan 2011 09:35:43 -0800 Subject: Shared: Make 'normalize' more generic. Now it can transform an Inline, [Inline], Block, [Block], or Pandoc. --- src/Text/Pandoc/Shared.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc') 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 -- cgit v1.2.3