git.iko.soy/typeable/pandoc
on master help sign in
Added some tests for mediawiki reader.
commitb19aee4e1e199309f91059a11154059db9411798 authorJohn MacFarlane <fiddlosopher@gmail.com> dateWed 12 Sep 2012, 19:15 (14 years ago) parent9353af9
3 files changed+51−5
src/Text/Pandoc/Readers/MediaWiki.hs−4 tests/mediawiki-reader.native+23−1 tests/mediawiki-reader.wiki+28
src/Text/Pandoc/Readers/MediaWiki.hs−4
@@ -44,9 +44,6 @@ _ raw mediawiki:
4444 _ templates or anything in {{}} (can be postprocessed)
4545 _ category links
4646_ gallery tag?
47−_ tests for raw html inline
48−_ tests for raw html block tags
49−_ test for <p> tags
5047_ tests for sup, sub, del
5148_ tests for pre, haskell, syntaxhighlight
5249_ tests for code, tt, hask
@@ -54,7 +51,6 @@ _ test for blockquote
5451_ tests for native lists
5552_ tests for autolink urls
5653_ tests for external links
57−_ tests for : lines
5854-}
5955module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where
6056
tests/mediawiki-reader.native+23−1
@@ -32,4 +32,26 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
3232,Para [Str "between",Space,Str "blocks"]
3333,Header 2 [Str "linebreaks"]
3434,Para [Str "hi",LineBreak,Str "there"]
35−,Para [Str "hi",LineBreak,Str "there"]]
35+,Para [Str "hi",LineBreak,Str "there"]
36+,Header 2 [Str ":",Space,Str "indents"]
37+,Para [Str "hi"]
38+,DefinitionList
39+ [([],
40+ [[Plain [Str "there"]]])]
41+,Para [Str "bud"]
42+,Para [Str "hi"]
43+,DefinitionList
44+ [([],
45+ [[DefinitionList
46+ [([],
47+ [[Plain [Str "there"]]])]]])]
48+,Para [Str "bud"]
49+,Header 2 [Str "p",Space,Str "tags"]
50+,Para [Str "hi",Space,Str "there"]
51+,Para [Str "bud"]
52+,Para [Str "another"]
53+,Header 2 [Str "raw",Space,Str "html"]
54+,Para [Str "hi",Space,RawInline "html" "<span style=\"color:red\">",Emph [Str "there"],RawInline "html" "</span>",Str "."]
55+,RawBlock "html" "<div class=\"special\">"
56+,Para [Str "hi",Space,Emph [Str "there"]]
57+,RawBlock "html" "</div>"]
tests/mediawiki-reader.wiki+28
@@ -69,3 +69,31 @@ hi<br/>there
6969hi<br>
7070there
7171
72+== : indents ==
73+
74+hi
75+: there
76+bud
77+
78+hi
79+:: there
80+bud
81+
82+== p tags ==
83+
84+hi there
85+<p>
86+bud
87+<p>
88+another
89+</p>
90+
91+== raw html ==
92+
93+hi <span style="color:red">''there''</span>.
94+
95+<div class="special">
96+hi ''there''
97+</div>
98+
99+