diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rst-reader.native | 10 | ||||
-rw-r--r-- | tests/rst-reader.rst | 28 |
2 files changed, 37 insertions, 1 deletions
diff --git a/tests/rst-reader.native b/tests/rst-reader.native index e0eb4d438..bf794c849 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -312,4 +312,12 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ": ,Para [Math DisplayMath "E = mc^2"] ,Para [Math DisplayMath "E = mc^2",Math DisplayMath "\\alpha = \\beta"] ,Para [Math DisplayMath "E &= mc^2\\\\\nF &= \\pi E",Math DisplayMath "F &= \\gamma \\alpha^2"] -,Para [Str "All",Space,Str "done",Str "."]] +,Para [Str "All",Space,Str "done",Str "."] +,Header 1 [Str "Default",Str "-",Str "Role"] +,Para [Str "Try",Space,Str "changing",Space,Str "the",Space,Str "default",Space,Str "role",Space,Str "to",Space,Str "a",Space,Str "few",Space,Str "different",Space,Str "things",Str "."] +,Header 2 [Str "Doesn",Str "\8217",Str "t",Space,Str "Break",Space,Str "Title",Space,Str "Parsing"] +,Para [Str "Inline",Space,Str "math",Str ":",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Str ".",Space,Str "Other",Space,Str "roles",Str ":",Space,Superscript [Str "super"],Str ",",Space,Subscript [Str "sub"],Str "."] +,Para [Math DisplayMath "\\alpha = beta",Math DisplayMath "E = mc^2"] +,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",Str "-",Str "role",Space,Str "to",Space,Str "the",Space,Str "default",Space,Str "default",Str "."] +,Para [Str "And",Space,Str "now",Space,Str "`",Str "some",Str "-",Str "invalid",Str "-",Str "string",Str "-",Str "3231231",Str "`",Space,Str "is",Space,Str "nonsense",Str "."]] diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index cfebd2054..abe6d4f69 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -565,3 +565,31 @@ display math: All done. +Default-Role +============ + +Try changing the default role to a few different things. + +.. default-role:: math + +Doesn't Break Title Parsing +--------------------------- + +Inline math: `E=mc^2` or :math:`E=mc^2` or `E=mc^2`:math:. +Other roles: :sup:`super`, `sub`:sub:. + +.. math:: + \alpha = beta + + E = mc^2 + +.. default-role:: sup + +Some `of` these :sup:`words` are in `superscript`:sup:. + +Reset default-role to the default default. + +.. default-role:: + +And now `some-invalid-string-3231231` is nonsense. + |