aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mediawiki-reader.native8
-rw-r--r--tests/mediawiki-reader.wiki25
2 files changed, 31 insertions, 2 deletions
diff --git a/tests/mediawiki-reader.native b/tests/mediawiki-reader.native
index c823bafaf..6eac94b9d 100644
--- a/tests/mediawiki-reader.native
+++ b/tests/mediawiki-reader.native
@@ -6,7 +6,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,Header 5 [Str "header",Space,Str "level",Space,Str "5"]
,Header 6 [Str "header",Space,Str "level",Space,Str "6"]
,Para [Str "=======",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "========"]
-,Para [Str "==",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "=="]
+,Para [Code ("",[],[]) "==\160not\160a\160header\160=="]
,Header 2 [Str "emph",Space,Str "and",Space,Str "strong"]
,Para [Emph [Str "emph"],Space,Strong [Str "strong"]]
,Para [Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph"]]]
@@ -131,4 +131,8 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
[[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]]
,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]]
,Header 2 [Str "math"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Math InlineMath "x=\\frac{y^\\pi}{z}",Str "."]]
+,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Math InlineMath "x=\\frac{y^\\pi}{z}",Str "."]
+,Header 2 [Str "preformatted",Space,Str "blocks"]
+,Para [Code ("",[],[]) "Start\160each\160line\160with\160a\160space.",LineBreak,Code ("",[],[]) "Text\160is\160",Strong [Code ("",[],[]) "preformatted"],Code ("",[],[]) "\160and",LineBreak,Emph [Code ("",[],[]) "markups"],Code ("",[],[]) "\160",Strong [Emph [Code ("",[],[]) "can"]],Code ("",[],[]) "\160be\160done."]
+,Para [Code ("",[],[]) "\160hell\160\160\160\160\160\160yeah"]
+,Para [Code ("",[],[]) "Start\160with\160a\160space\160in\160the\160first\160column,",LineBreak,Code ("",[],[]) "(before\160the\160<nowiki>).",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "Then\160your\160block\160format\160will\160be",LineBreak,Code ("",[],[]) "\160\160\160\160maintained.",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "This\160is\160good\160for\160copying\160in\160code\160blocks:",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "def\160function():",LineBreak,Code ("",[],[]) "\160\160\160\160\"\"\"documentation\160string\"\"\"",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "\160\160\160\160if\160True:",LineBreak,Code ("",[],[]) "\160\160\160\160\160\160\160\160print\160True",LineBreak,Code ("",[],[]) "\160\160\160\160else:",LineBreak,Code ("",[],[]) "\160\160\160\160\160\160\160\160print\160False"]]
diff --git a/tests/mediawiki-reader.wiki b/tests/mediawiki-reader.wiki
index b03c0f72d..7066b4a59 100644
--- a/tests/mediawiki-reader.wiki
+++ b/tests/mediawiki-reader.wiki
@@ -193,3 +193,28 @@ ends the list.
Here is some <math>x=\frac{y^\pi}{z}</math>.
+== preformatted blocks ==
+
+ Start each line with a space.
+ Text is '''preformatted''' and
+ ''markups'' '''''can''''' be done.
+
+ hell yeah
+
+ <nowiki>Start with a space in the first column,
+(before the <nowiki>).
+
+Then your block format will be
+ maintained.
+
+This is good for copying in code blocks:
+
+def function():
+ """documentation string"""
+
+ if True:
+ print True
+ else:
+ print False</nowiki>
+
+