From cd460ec9c75f6f971125b75f9c3214a693ba651b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 28 Feb 2024 11:27:34 -0800 Subject: Fix regression in section numbering. Starting with pandoc 3.1.12, unnumbered sections incremented the section number. Closes #9516. --- src/Text/Pandoc/Shared.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 0c58ad9fe..7318f2e86 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -529,7 +529,7 @@ makeSections numbering mbBaseLevel bs = | otherwise = 0 let newnum = zipWith adjustNum [minLevel..level] (lastnum ++ repeat 0) - unless (null newnum) $ S.put newnum + unless (null newnum || "unnumbered" `elem` classes) $ S.put newnum let (sectionContents, rest) = break (headerLtEq level) xs sectionContents' <- go sectionContents rest' <- go rest -- cgit v1.2.3