aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-02-15 22:20:26 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-02-15 22:20:26 -0800
commit56320f479e13bd643168d4f7217407490dbaf9ca (patch)
tree977e56ad7a2bc333261b0b5e680f94c1ef133448 /tests
parent0f1fa1b586312ad7947b5a2407b153b7b55d236e (diff)
parent66fd9bf7595cd97ccd24b0d64748c852dc604ce8 (diff)
downloadpandoc-56320f479e13bd643168d4f7217407490dbaf9ca.tar.gz
Merge pull request #1163 from merijn/master
Extended the rST parser's handling of roles.
Diffstat (limited to 'tests')
-rw-r--r--tests/rst-reader.native10
-rw-r--r--tests/rst-reader.rst24
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/rst-reader.native b/tests/rst-reader.native
index 497810f39..fd48bc60c 100644
--- a/tests/rst-reader.native
+++ b/tests/rst-reader.native
@@ -319,5 +319,15 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
,Para [Str "Some",Space,Superscript [Str "of"],Space,Str "these",Space,Superscript [Str "words"],Space,Str "are",Space,Str "in",Space,Superscript [Str "superscript"],Str "."]
,Para [Str "Reset",Space,Str "default-role",Space,Str "to",Space,Str "the",Space,Str "default",Space,Str "default."]
,Para [Str "And",Space,Str "now",Space,Str "some-invalid-string-3231231",Space,Str "is",Space,Str "nonsense."]
+,Null
+,Para [Str "And",Space,Str "now",Space,Str "with",Space,RawInline (Format "html") "<b>inline</b> <span id=\"test\">HTML</span>",Str "."]
+,Null
+,Para [Str "And",Space,Str "some",Space,Str "inline",Space,Str "haskell",Space,Code ("",["sourceCode","haskell"],[]) "fmap id [1,2..10]",Str "."]
+,Null
+,Null
+,Para [Str "Indirect",Space,Str "python",Space,Str "role",Space,Code ("",["sourceCode","python"],[]) "[x*x for x in [1,2,3,4,5]]",Str "."]
+,Null
+,Null
+,Para [Str "Different",Space,Str "indirect",Space,Str "C",Space,Code ("",["sourceCode","c"],[]) "int x = 15;",Str "."]
,Header 2 ("literal-symbols",[],[]) [Str "Literal",Space,Str "symbols"]
,Para [Str "2*2",Space,Str "=",Space,Str "4*1"]]
diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst
index 748bfe0a5..930bf2ed2 100644
--- a/tests/rst-reader.rst
+++ b/tests/rst-reader.rst
@@ -599,6 +599,30 @@ Reset default-role to the default default.
And now `some-invalid-string-3231231` is nonsense.
+.. role:: html(raw)
+ :format: html
+
+And now with :html:`<b>inline</b> <span id="test">HTML</span>`.
+
+.. role:: haskell(code)
+ :language: haskell
+
+And some inline haskell :haskell:`fmap id [1,2..10]`.
+
+.. role:: indirect(code)
+
+.. role:: python(indirect)
+ :language: python
+
+Indirect python role :python:`[x*x for x in [1,2,3,4,5]]`.
+
+.. role:: different-indirect(code)
+ :language: c
+
+.. role:: c(different-indirect)
+
+Different indirect C :c:`int x = 15;`.
+
Literal symbols
---------------