From 6e2cfd6c97b1b8657f1f3e2b66090a2c3ba8d887 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 6 Sep 2019 08:44:36 -0700 Subject: Improve detection of headings in Divs by hierarchicalize. The structure ```

one

two

``` should create two coordinate sections, not a section with a subsection. Now it does. Extends #3057. --- src/Text/Pandoc/Shared.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text') 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. -- cgit v1.2.3