From 61d93d24502a40da129c2ceff1f1c21245c97e61 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 2 Nov 2022 09:56:22 -0700 Subject: ODT reader: handle "section" elements. Previously these were simply skipped! Closes #8409. --- src/Text/Pandoc/Readers/ODT/ContentReader.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/ODT/ContentReader.hs b/src/Text/Pandoc/Readers/ODT/ContentReader.hs index 0e44b01a3..97f51d5fa 100644 --- a/src/Text/Pandoc/Readers/ODT/ContentReader.hs +++ b/src/Text/Pandoc/Readers/ODT/ContentReader.hs @@ -678,9 +678,24 @@ read_list_element listElement = matchingElement NsText listElement ( matchChildContent' [ read_paragraph , read_header , read_list + , read_section ] ) +---------------------- +-- Sections +---------------------- + +read_section :: ElementMatcher Blocks +read_section = matchingElement NsText "section" + $ liftA (divWith nullAttr) + $ matchChildContent' [ read_paragraph + , read_header + , read_list + , read_table + , read_section + ] + ---------------------- -- Links @@ -937,6 +952,7 @@ read_text :: ODTReaderSafe _x Pandoc read_text = matchChildContent' [ read_header , read_paragraph , read_list + , read_section , read_table ] >>^ doc -- cgit v1.2.3