git.iko.soy/typeable/pandoc
on master help sign in
Bullet and ordered lists now always simple in dokuwiki writer (#386)
6cc284cclaremacrae
src/Text/Pandoc/Writers/DokuWiki.hs+2−3
@@ -275,9 +275,8 @@ definitionListItemToDokuWiki opts (label, items) = do
275isSimpleList :: Block -> Bool
275isSimpleList :: Block -> Bool
276isSimpleList x =
276isSimpleList x =
277 case x of
277 case x of
278− BulletList items -> all isSimpleListItem items
278+ BulletList items -> True
279− OrderedList (num, sty, _) items -> all isSimpleListItem items &&
279+ OrderedList (num, sty, _) items -> True
280− num == 1 && sty `elem` [DefaultStyle, Decimal]
281 DefinitionList items -> all isSimpleListItem $ concatMap snd items
280 DefinitionList items -> all isSimpleListItem $ concatMap snd items
282 _ -> False
281 _ -> False
283
282
tests/writer.dokuwiki+15−28
@@ -157,11 +157,10 @@ and using spaces:
157
157
158Multiple paragraphs:
158Multiple paragraphs:
159
159
160−<ol style="list-style-type: decimal;">
161−<li><p>Item 1, graf one.</p>
160+ - Item 1, graf one.
162−<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p></li>
161+Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
163−<li><p>Item 2.</p></li>
162+ - Item 2.
164−<li><p>Item 3.</p></li></ol>
163+ - Item 3.
165
164
166===== Nested =====
165===== Nested =====
167
166
@@ -196,32 +195,20 @@ Same thing but with paragraphs:
196
195
197===== Fancy list markers =====
196===== Fancy list markers =====
198
197
199−<ol start="2" style="list-style-type: decimal;">
200−<li>begins with 2</li>
198+ - begins with 2
201−<li><p>and now 3</p>
199+ - and now 3
202−<p>with a continuation</p>
200+with a continuation
203−<ol start="4" style="list-style-type: lower-roman;">
204−<li>sublist with roman numerals, starting with 4</li>
201+ - sublist with roman numerals, starting with 4
205−<li>more items
202+ - more items
206−<ol style="list-style-type: upper-alpha;">
207−<li>a subsublist</li>
203+ - a subsublist
208−<li>a subsublist</li></ol>
204+ - a subsublist
209−</li></ol>
210−</li></ol>
211
205
212Nesting:
206Nesting:
213
207
214−<ol style="list-style-type: upper-alpha;">
215−<li>Upper Alpha
208+ - Upper Alpha
216−<ol style="list-style-type: upper-roman;">
217−<li>Upper Roman.
209+ - Upper Roman.
218−<ol start="6" style="list-style-type: decimal;">
219−<li>Decimal start with 6
210+ - Decimal start with 6
220−<ol start="3" style="list-style-type: lower-alpha;">
221−<li>Lower alpha with paren</li></ol>
211+ - Lower alpha with paren
222−</li></ol>
223−</li></ol>
224−</li></ol>
225
212
226Autonumbering:
213Autonumbering:
227
214