diff options
Diffstat (limited to 'man/make-pandoc-man-pages.hs')
-rw-r--r-- | man/make-pandoc-man-pages.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/man/make-pandoc-man-pages.hs b/man/make-pandoc-man-pages.hs index 31a935a28..52e2741f1 100644 --- a/man/make-pandoc-man-pages.hs +++ b/man/make-pandoc-man-pages.hs @@ -55,7 +55,7 @@ removeLinks (Link l _) = l removeLinks x = [x] capitalizeHeaders :: Block -> Block -capitalizeHeaders (Header 1 xs) = Header 1 $ bottomUp capitalize xs +capitalizeHeaders (Header 1 attr xs) = Header 1 attr $ bottomUp capitalize xs capitalizeHeaders x = x capitalize :: Inline -> Inline @@ -63,22 +63,22 @@ 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) | normalize x == normalize 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) | normalize z == normalize ils = bottomUp promoteHeader $ takeWhile (not . isHeader1) xs - where promoteHeader (Header n x) = Header (n-1) x + where promoteHeader (Header n attr x) = Header (n-1) attr x promoteHeader x = x extractSect ils (x:xs) = extractSect ils xs extractSect _ [] = [] isHeader1 :: Block -> Bool -isHeader1 (Header 1 _) = True -isHeader1 _ = False +isHeader1 (Header 1 _ _ ) = True +isHeader1 _ = False -- | Returns a list of 'dependencies' that have been modified after 'file'. |