diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-01-08 11:36:33 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-01-08 11:36:33 -0800 |
commit | 8673eb079bc389f340bafd4c191c642afc7e1603 (patch) | |
tree | a1111e65028c23488ff5d4652a60bdb27feb4153 /test/Tests/Readers | |
parent | 230e07ddfce31ba89a12e39ecf995577d0bb67a8 (diff) | |
download | pandoc-8673eb079bc389f340bafd4c191c642afc7e1603.tar.gz |
Removed superfluous sourceCode class on code blocks.
* These were added by the RST reader and, for literate Haskell,
by the Markdown and LaTeX readers. There is no point to
this class, and it is not applied consistently by all readers.
See #5047.
* Reverse order of `literate` and `haskell` classes on code blocks
when parsing literate Haskell. Better if `haskell` comes first.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r-- | test/Tests/Readers/Markdown.hs | 4 | ||||
-rw-r--r-- | test/Tests/Readers/RST.hs | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/Tests/Readers/Markdown.hs b/test/Tests/Readers/Markdown.hs index be89e708e..75401fb91 100644 --- a/test/Tests/Readers/Markdown.hs +++ b/test/Tests/Readers/Markdown.hs @@ -319,9 +319,9 @@ tests = [ testGroup "inline code" Ext_literate_haskell pandocExtensions }) "inverse bird tracks and html" $ "> a\n\n< b\n\n<div>\n" - =?> codeBlockWith ("",["sourceCode","literate","haskell"],[]) "a" + =?> codeBlockWith ("",["haskell","literate"],[]) "a" <> - codeBlockWith ("",["sourceCode","haskell"],[]) "b" + codeBlockWith ("",["haskell"],[]) "b" <> rawBlock "html" "<div>\n\n" ] diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs index 963e7530d..d69440843 100644 --- a/test/Tests/Readers/RST.hs +++ b/test/Tests/Readers/RST.hs @@ -106,7 +106,7 @@ tests = [ "line block with blank line" =: ] =?> doc (codeBlockWith ( "" - , ["sourceCode", "python", "numberLines", "class1", "class2", "class3"] + , ["python", "numberLines", "class1", "class2", "class3"] , [ ("startFrom", "34") ] ) "def func(x):\n return y") @@ -119,7 +119,7 @@ tests = [ "line block with blank line" =: ] =?> doc (codeBlockWith ( "" - , ["sourceCode", "python", "numberLines"] + , ["python", "numberLines"] , [ ("startFrom", "") ] ) "def func(x):\n return y") @@ -164,18 +164,18 @@ tests = [ "line block with blank line" =: [ "literal role prefix" =: ":literal:`a`" =?> para (code "a") , "literal role postfix" =: "`a`:literal:" =?> para (code "a") , "literal text" =: "``text``" =?> para (code "text") - , "code role" =: ":code:`a`" =?> para (codeWith ("", ["sourceCode"], []) "a") + , "code role" =: ":code:`a`" =?> para (codeWith ("", [], []) "a") , "inherited code role" =: ".. role:: codeLike(code)\n\n:codeLike:`a`" - =?> para (codeWith ("", ["codeLike", "sourceCode"], []) "a") + =?> para (codeWith ("", ["codeLike"], []) "a") , "custom code role with language field" =: ".. role:: lhs(code)\n :language: haskell\n\n:lhs:`a`" - =?> para (codeWith ("", ["lhs", "haskell","sourceCode"], []) "a") + =?> para (codeWith ("", ["lhs", "haskell"], []) "a") , "custom role with unspecified parent role" =: ".. role:: classy\n\n:classy:`text`" =?> para (spanWith ("", ["classy"], []) "text") , "role with recursive inheritance" =: ".. role:: haskell(code)\n.. role:: lhs(haskell)\n\n:lhs:`text`" - =?> para (codeWith ("", ["lhs", "haskell", "sourceCode"], []) "text") + =?> para (codeWith ("", ["lhs", "haskell"], []) "text") , "unknown role" =: ":unknown:`text`" =?> para (codeWith ("",["interpreted-text"],[("role","unknown")]) "text") ] |