OpenDocument writer: fixed dropped elements in some ordered lists.
Closes #2434.
This commit is contained in:
parent
fb47d1d909
commit
ce9d49ef04
2 changed files with 60 additions and 1 deletions
|
@ -243,7 +243,7 @@ orderedListToOpenDocument o pn bs =
|
|||
orderedItemToOpenDocument :: PandocMonad m
|
||||
=> WriterOptions -> Int -> [Block] -> OD m Doc
|
||||
orderedItemToOpenDocument o n (b:bs)
|
||||
| OrderedList a l <- b = newLevel a l
|
||||
| OrderedList a l <- b = go =<< newLevel a l
|
||||
| Para l <- b = go =<< inParagraphTagsWithStyle ("P" ++ show n) <$> inlinesToOpenDocument o l
|
||||
| otherwise = go =<< blockToOpenDocument o b
|
||||
where
|
||||
|
|
59
test/command/2434.md
Normal file
59
test/command/2434.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
```
|
||||
% pandoc -t opendocument
|
||||
1. a
|
||||
2. b
|
||||
1. alpha
|
||||
2. beta
|
||||
* gamma
|
||||
^D
|
||||
<text:list text:style-name="L1">
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">a</text:p>
|
||||
</text:list-item>
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">b</text:p>
|
||||
<text:list>
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">alpha</text:p>
|
||||
</text:list-item>
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">beta</text:p>
|
||||
</text:list-item>
|
||||
</text:list>
|
||||
<text:list text:style-name="L2">
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P2">gamma</text:p>
|
||||
</text:list-item>
|
||||
</text:list>
|
||||
</text:list-item>
|
||||
</text:list>
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -t opendocument
|
||||
(@) text
|
||||
|
||||
some text
|
||||
|
||||
a) sub item 1
|
||||
b) sub item 2
|
||||
|
||||
more text -- this line is missing in the odt output
|
||||
^D
|
||||
<text:list text:style-name="L1">
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">text</text:p>
|
||||
<text:p text:style-name="P1">some text</text:p>
|
||||
<text:list>
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">sub item 1</text:p>
|
||||
</text:list-item>
|
||||
<text:list-item>
|
||||
<text:p text:style-name="P1">sub item 2</text:p>
|
||||
</text:list-item>
|
||||
</text:list>
|
||||
<text:p text:style-name="P1">more text – this line is missing in the
|
||||
odt output</text:p>
|
||||
</text:list-item>
|
||||
</text:list>
|
||||
```
|
Loading…
Reference in a new issue