aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-11-02 09:56:22 -0700
committerJohn MacFarlane <[email protected]>2022-11-02 09:56:22 -0700
commit61d93d24502a40da129c2ceff1f1c21245c97e61 (patch)
treefad1e95c830ab97b44c5dd718e2793f7fadea39f
parentb3f4a66ec8a1d4c903ce3b1b7ad761545d7de290 (diff)
ODT reader: handle "section" elements.
Previously these were simply skipped! Closes #8409.
-rw-r--r--src/Text/Pandoc/Readers/ODT/ContentReader.hs16
1 files changed, 16 insertions, 0 deletions
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