aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-02-28 11:27:34 -0800
committerJohn MacFarlane <[email protected]>2024-02-28 11:31:05 -0800
commitcd460ec9c75f6f971125b75f9c3214a693ba651b (patch)
treeb4978912e48319e538d048f9279f750a1182ddf4 /src
parent87b07c699a5f4be6a14d45984db4898405157a65 (diff)
Fix regression in section numbering.
Starting with pandoc 3.1.12, unnumbered sections incremented the section number. Closes #9516.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Shared.hs2
1 files changed, 1 insertions, 1 deletions
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