From f6a020a906e5b03defa9924819b7f8cf2f626277 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 17 Feb 2014 15:18:52 -0800 Subject: HTML writer: Fixed bug with unnumbered section headings. Unnumbered section headings (with class 'unnumbered') were getting numbers. This commit fixes the bug. --- src/Text/Pandoc/Writers/HTML.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers/HTML.hs') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 805bb57f1..3ac2a836f 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -475,10 +475,11 @@ blockToHtml opts (BlockQuote blocks) = else do contents <- blockListToHtml opts blocks return $ H.blockquote $ nl opts >> contents >> nl opts -blockToHtml opts (Header level (_,_,_) lst) = do +blockToHtml opts (Header level (_,classes,_) lst) = do contents <- inlineListToHtml opts lst secnum <- liftM stSecNum get let contents' = if writerNumberSections opts && not (null secnum) + && "unnumbered" `notElem` classes then (H.span ! A.class_ "header-section-number" $ toHtml $ showSecNum secnum) >> strToHtml " " >> contents else contents -- cgit v1.2.3