aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-02-17 15:18:52 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-02-17 15:18:52 -0800
commitf6a020a906e5b03defa9924819b7f8cf2f626277 (patch)
treee794d4056c23574847dc1181bf1a308b93c9a706 /src/Text/Pandoc
parent56320f479e13bd643168d4f7217407490dbaf9ca (diff)
downloadpandoc-f6a020a906e5b03defa9924819b7f8cf2f626277.tar.gz
HTML writer: Fixed bug with unnumbered section headings.
Unnumbered section headings (with class 'unnumbered') were getting numbers. This commit fixes the bug.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs3
1 files changed, 2 insertions, 1 deletions
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