git.iko.soy/typeable/pandoc
on master help sign in
Bullet and ordered lists now always simple in dokuwiki writer (#386)
commit6cc284cc8eadf6a1d9099b7f1e2b68b3d1ac4561 authorclaremacrae <github@cfmacrae.fastmail.co.uk> dateMon 19 Aug 2013, 20:45 (13 years ago) parent883f119
2 files changed+17−31
src/Text/Pandoc/Writers/DokuWiki.hs+2−3 tests/writer.dokuwiki+15−28
src/Text/Pandoc/Writers/DokuWiki.hs+2−3
@@ -275,9 +275,8 @@ definitionListItemToDokuWiki opts (label, items) = do
275275isSimpleList :: Block -> Bool
276276isSimpleList x =
277277 case x of
278− BulletList items -> all isSimpleListItem items
279− OrderedList (num, sty, _) items -> all isSimpleListItem items &&
280− num == 1 && sty `elem` [DefaultStyle, Decimal]
278+ BulletList items -> True
279+ OrderedList (num, sty, _) items -> True
281280 DefinitionList items -> all isSimpleListItem $ concatMap snd items
282281 _ -> False
283282
tests/writer.dokuwiki+15−28
@@ -157,11 +157,10 @@ and using spaces:
157157
158158Multiple paragraphs:
159159
160−<ol style="list-style-type: decimal;">
161−<li><p>Item 1, graf one.</p>
162−<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p></li>
163−<li><p>Item 2.</p></li>
164−<li><p>Item 3.</p></li></ol>
160+ - Item 1, graf one.
161+Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
162+ - Item 2.
163+ - Item 3.
165164
166165===== Nested =====
167166
@@ -196,32 +195,20 @@ Same thing but with paragraphs:
196195
197196===== Fancy list markers =====
198197
199−<ol start="2" style="list-style-type: decimal;">
200−<li>begins with 2</li>
201−<li><p>and now 3</p>
202−<p>with a continuation</p>
203−<ol start="4" style="list-style-type: lower-roman;">
204−<li>sublist with roman numerals, starting with 4</li>
205−<li>more items
206−<ol style="list-style-type: upper-alpha;">
207−<li>a subsublist</li>
208−<li>a subsublist</li></ol>
209−</li></ol>
210−</li></ol>
198+ - begins with 2
199+ - and now 3
200+with a continuation
201+ - sublist with roman numerals, starting with 4
202+ - more items
203+ - a subsublist
204+ - a subsublist
211205
212206Nesting:
213207
214−<ol style="list-style-type: upper-alpha;">
215−<li>Upper Alpha
216−<ol style="list-style-type: upper-roman;">
217−<li>Upper Roman.
218−<ol start="6" style="list-style-type: decimal;">
219−<li>Decimal start with 6
220−<ol start="3" style="list-style-type: lower-alpha;">
221−<li>Lower alpha with paren</li></ol>
222−</li></ol>
223−</li></ol>
224−</li></ol>
208+ - Upper Alpha
209+ - Upper Roman.
210+ - Decimal start with 6
211+ - Lower alpha with paren
225212
226213Autonumbering:
227214