diff options
Diffstat (limited to 'man/make-pandoc-man-pages.hs')
-rw-r--r-- | man/make-pandoc-man-pages.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/man/make-pandoc-man-pages.hs b/man/make-pandoc-man-pages.hs index 008294433..afba9135a 100644 --- a/man/make-pandoc-man-pages.hs +++ b/man/make-pandoc-man-pages.hs @@ -27,7 +27,7 @@ main = do unless (null ds1 && null ds2) $ do rmContents <- UTF8.readFile "README" - let (Pandoc meta blocks) = readMarkdown def rmContents + let (Pandoc meta blocks) = normalize $ readMarkdown def rmContents let manBlocks = removeSect [Str "Wrappers"] $ removeSect [Str "Pandoc's",Space,Str "markdown"] blocks let syntaxBlocks = extractSect [Str "Pandoc's",Space,Str "markdown"] blocks @@ -67,13 +67,13 @@ capitalize (Str xs) = Str $ map toUpper xs capitalize x = x removeSect :: [Inline] -> [Block] -> [Block] -removeSect ils (Header 1 _ x:xs) | normalize x == normalize ils = +removeSect ils (Header 1 _ x:xs) | x == ils = dropWhile (not . isHeader1) xs removeSect ils (x:xs) = x : removeSect ils xs removeSect _ [] = [] extractSect :: [Inline] -> [Block] -> [Block] -extractSect ils (Header 1 _ z:xs) | normalize z == normalize ils = +extractSect ils (Header 1 _ z:xs) | z == ils = bottomUp promoteHeader $ takeWhile (not . isHeader1) xs where promoteHeader (Header n attr x) = Header (n-1) attr x promoteHeader x = x |