diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-10-13 21:39:17 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-10-13 21:39:17 +0000 |
commit | 8144c54f826d4d8b995e0e267a908dff459704ad (patch) | |
tree | 8ec78a6ef0e1031d2b5c56c47a29188807487ac0 /tests | |
parent | 11e7ad2259eaac1f126aa6f3f1b992eeaa4c0a20 (diff) | |
download | pandoc-8144c54f826d4d8b995e0e267a908dff459704ad.tar.gz |
Improvements to RST reader:
+ Allow field lists to be indented.
+ Parse the contents of field lists instead of treating them as
raw strings.
+ Represent field lists as definition lists rather than blockquotes.
+ Fixed bug in which metadata would be overridden if the document
contained more than one field list.
+ Parse fields associated with ..image: blocks, and use the 'alt'
field, if present, for image alt text and title.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1050 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rst-reader.native | 29 | ||||
-rw-r--r-- | tests/rst-reader.rst | 17 |
2 files changed, 43 insertions, 3 deletions
diff --git a/tests/rst-reader.native b/tests/rst-reader.native index bbd139776..8536a2874 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -1,7 +1,8 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str "Subtitle"] ["John MacFarlane","Anonymous"] "July 17, 2006") -[ BlockQuote - [ Para [Strong [Str "Revision"],Str ":",Space,Str "3"] ] - +[ DefinitionList + [ ([Str "Revision"], + [ Plain [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.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."] , Header 2 [Str "Level",Space,Str "two",Space,Str "header"] @@ -156,6 +157,27 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str ([Str "term",Space,Str "with",Space,Emph [Str "emphasis"]], [ Para [Str "Definition",Space,Str "3."] ] ) ] +, Header 1 [Str "Field",Space,Str "Lists"] +, DefinitionList + [ ([Str "address"], + [ Plain [Str "61",Space,Str "Main",Space,Str "St."] ] + ), + ([Str "city"], + [ Plain [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"] ] + ), + ([Str "phone"], + [ Plain [Str "123",Str "-",Str "4567"] ] + ) ] +, DefinitionList + [ ([Str "address"], + [ Plain [Str "61",Space,Str "Main",Space,Str "St."] ] + ), + ([Str "city"], + [ Plain [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"] ] + ), + ([Str "phone"], + [ Plain [Str "123",Str "-",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 ":"] , RawHtml "<div>foo</div>\n" @@ -207,5 +229,6 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str , Header 1 [Str "Images"] , Para [Str "From",Space,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")] , Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon."] ] diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index 36fd4ff9d..f3d07b49d 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -256,6 +256,19 @@ term 2 term with *emphasis* Definition 3. +Field Lists +=========== + + :address: 61 Main St. + :city: *Nowhere*, MA, + USA + :phone: 123-4567 + +:address: 61 Main St. +:city: *Nowhere*, MA, + USA +:phone: 123-4567 + HTML Blocks =========== @@ -382,6 +395,10 @@ From "Voyage dans la Lune" by Georges Melies (1902): .. image:: lalune.jpg +.. image:: lalune.jpg + :height: 2343 + :alt: Voyage dans la Lune + Here is a movie |movie| icon. .. |movie| image:: movie.jpg |