diff options
| author | John MacFarlane <[email protected]> | 2024-02-28 11:27:34 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-02-28 11:31:05 -0800 |
| commit | cd460ec9c75f6f971125b75f9c3214a693ba651b (patch) | |
| tree | b4978912e48319e538d048f9279f750a1182ddf4 /src | |
| parent | 87b07c699a5f4be6a14d45984db4898405157a65 (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.hs | 2 |
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 |
