aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuong Nguyen Manh <[email protected]>2022-01-02 11:28:38 +0100
committerJohn MacFarlane <[email protected]>2022-01-02 15:05:09 -0800
commit32297d56772e97ce39f54f6879ae2f69f3c4c6dd (patch)
treef9d20aa3b8b9baf4b8bed2d1ff4dca948bab5c49 /src
parent808bcb5d3b87825b1f67ca8b2cad76e1952a503d (diff)
Odt: Add list-header
The list-header is a type of list-item. Therefore, it will be treated exactly like one.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Odt/ContentReader.hs21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Odt/ContentReader.hs b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
index 5520d039f..998999d25 100644
--- a/src/Text/Pandoc/Readers/Odt/ContentReader.hs
+++ b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
@@ -661,16 +661,23 @@ read_list = matchingElement NsText "list"
$ constructList
-- $ liftA bulletList
$ matchChildContent' [ read_list_item
+ , read_list_header
]
--
read_list_item :: ElementMatcher [Blocks]
-read_list_item = matchingElement NsText "list-item"
- $ liftA (compactify.(:[]))
- ( matchChildContent' [ read_paragraph
- , read_header
- , read_list
- ]
- )
+read_list_item = read_list_element "list-item"
+
+read_list_header :: ElementMatcher [Blocks]
+read_list_header = read_list_element "list-header"
+
+read_list_element :: ElementName -> ElementMatcher [Blocks]
+read_list_element listElement = matchingElement NsText listElement
+ $ liftA (compactify.(:[]))
+ ( matchChildContent' [ read_paragraph
+ , read_header
+ , read_list
+ ]
+ )
----------------------