diff options
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 3 | ||||
-rw-r--r-- | test/command/3057.md | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 949f53a3a..4dc2484e7 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -544,7 +544,8 @@ hierarchicalizeWithIds (x:rest) = do headerLtEq :: Int -> Block -> Bool headerLtEq level (Header l _ _) = l <= level -headerLtEq level (Div ("",["references"],[]) (Header l _ _ : _)) = l <= level +headerLtEq level (Div ("",classes,[]) (Header l _ _ : _)) = + l <= level && "column" `notElem` classes && "columns" `notElem` classes headerLtEq _ _ = False -- | Generate a unique identifier from a list of inlines. diff --git a/test/command/3057.md b/test/command/3057.md index b1f3a8c2e..0db5e7969 100644 --- a/test/command/3057.md +++ b/test/command/3057.md @@ -45,10 +45,12 @@ ^D <section xml:id="one"> <title>one</title> - <section> - <title>two</title> - <para> - </para> - </section> + <para> + </para> +</section> +<section> + <title>two</title> + <para> + </para> </section> ``` |