From 689fb112bf925ce5394f88b48066be8abdc7fc34 Mon Sep 17 00:00:00 2001 From: Daniel Bergey Date: Thu, 11 Dec 2014 18:50:24 +0000 Subject: RST Reader: compute Attrs when role is defined Move recursive role lookup from renderRole to addNewRole. The Attr value will be the same for every occurance of this role, so there's no reason to compute it every time. This allows simplifying the stateRstCustomRoles map considerably. We could go even further, and remove the fmt and attr arguments to renderRole, which are null except for custom roles. --- tests/Tests/Readers/RST.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Tests/Readers/RST.hs') diff --git a/tests/Tests/Readers/RST.hs b/tests/Tests/Readers/RST.hs index 9d5a8425b..1aaf4897f 100644 --- a/tests/Tests/Readers/RST.hs +++ b/tests/Tests/Readers/RST.hs @@ -99,7 +99,7 @@ tests = [ "line block with blank line" =: =?> para (codeWith ("", ["codeLike", "sourceCode"], []) "a") , "custom code role with language field" =: ".. role:: lhs(code)\n :language: haskell\n\n:lhs:`a`" - =?> para (codeWith ("", ["sourceCode", "haskell", "lhs"], []) "a") + =?> para (codeWith ("", ["lhs", "haskell","sourceCode"], []) "a") , "custom role with unspecified parent role" =: ".. role:: classy\n\n:classy:`text`" =?> para (spanWith ("", ["classy"], []) "text") -- cgit v1.2.3