From 42f0b0cdab19e73100d9b8fe91722290048a7b55 Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Sat, 21 Dec 2019 09:20:07 -0800 Subject: [PATCH] Fix regression with --number-sections. Starting with 2.8, `--number-sections` also had the effect of `--section-divs`, even if `--section-divs` was not specified. --- src/Text/Pandoc/Writers/HTML.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 784606dd5..32a3b853b 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -684,8 +684,7 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs) else id) $ t <> if null innerSecs then mempty else nl opts <> innerContents - else if writerSectionDivs opts || slide || not (null dclasses) || - not (null dkvs) + else if writerSectionDivs opts || slide || not (null dclasses) then addAttrs opts attr $ secttag $ nl opts <> header' <> nl opts <>