From 8673eb079bc389f340bafd4c191c642afc7e1603 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 8 Jan 2019 11:36:33 -0800 Subject: 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. --- test/Tests/Readers/Markdown.hs | 4 ++-- test/Tests/Readers/RST.hs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'test/Tests') 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
\n" - =?> codeBlockWith ("",["sourceCode","literate","haskell"],[]) "a" + =?> codeBlockWith ("",["haskell","literate"],[]) "a" <> - codeBlockWith ("",["sourceCode","haskell"],[]) "b" + codeBlockWith ("",["haskell"],[]) "b" <> rawBlock "html" "
\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") ] -- cgit v1.2.3