summaryrefslogtreecommitdiff
path: root/tests/rst-reader.native
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-26 17:18:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-26 17:23:57 -0800
commit703c421c9e8684bb20aa091223ca5e532b6bb867 (patch)
treea207a2ac7c25341382392447798c89089286283b /tests/rst-reader.native
parent80f5a89a0bc7342fed7251d4e3f3bc8bda1a7acc (diff)
RST reader: Improved field lists.
Field lists now work properly with block content. (Thanks to Lachlan Musicman for pointing out the bug.) In addition, definition list items are now always Para instead of Plain -- which matches behavior of rst2xml.py. Finally, in image blocks, the alt attribute is parsed properly and used for the alt, not also the title.
Diffstat (limited to 'tests/rst-reader.native')
-rw-r--r--tests/rst-reader.native25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/rst-reader.native b/tests/rst-reader.native
index e11e7b0ed..0213f789e 100644
--- a/tests/rst-reader.native
+++ b/tests/rst-reader.native
@@ -1,7 +1,7 @@
Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str "Subtitle"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17,",Space,Str "2006"]})
[DefinitionList
[([Str "Revision"],
- [[Plain [Str "3"]]])]
+ [[Para [Str "3"]]])]
,Header 1 [Str "Level",Space,Str "one",Space,Str "header"]
,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
,Header 2 [Str "Level",Space,Str "two",Space,Str "header"]
@@ -158,20 +158,21 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
,([Str "term",Space,Str "with",Space,Emph [Str "emphasis"]],
[[Para [Str "Definition",Space,Str "3",Str "."]]])]
,Header 1 [Str "Field",Space,Str "Lists"]
+,BlockQuote
+ [DefinitionList
+ [([Str "address"],
+ [[Para [Str "61",Space,Str "Main",Space,Str "St",Str "."]]])
+ ,([Str "city"],
+ [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
+ ,([Str "phone"],
+ [[Para [Str "123",EnDash,Str "4567"]]])]]
,DefinitionList
[([Str "address"],
- [[Plain [Str "61",Space,Str "Main",Space,Str "St",Str "."]]])
- ,([Str "city"],
- [[Plain [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
- ,([Str "phone"],
- [[Plain [Str "123",EnDash,Str "4567"]]])]
-,DefinitionList
- [([Str "address"],
- [[Plain [Str "61",Space,Str "Main",Space,Str "St",Str "."]]])
+ [[Para [Str "61",Space,Str "Main",Space,Str "St",Str "."]]])
,([Str "city"],
- [[Plain [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
+ [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
,([Str "phone"],
- [[Plain [Str "123",EnDash,Str "4567"]]])]
+ [[Para [Str "123",EnDash,Str "4567"]]])]
,Header 1 [Str "HTML",Space,Str "Blocks"]
,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line",Str ":"]
,RawBlock "html" "<div>foo</div>\n"
@@ -223,7 +224,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
,Header 1 [Str "Images"]
,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902)",Str ":"]
,Plain [Image [Str "image"] ("lalune.jpg","")]
-,Plain [Image [Str "Voyage dans la Lune"] ("lalune.jpg","Voyage dans la Lune")]
+,Plain [Image [Str "Voyage dans la Lune"] ("lalune.jpg","")]
,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
,Header 1 [Str "Comments"]
,Para [Str "First",Space,Str "paragraph"]