From c4e8a504386be76f83350fd965e053c66439def0 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 15 Sep 2010 02:24:07 +0200 Subject: anonymous links fixed --- rst_context.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rst_context.lua b/rst_context.lua index 4f333a2..a51f606 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -141,18 +141,12 @@ end function rst_context.link_standalone (str) return "\n" - .. [[\\goto{\\hyphenatedurl{]] - .. str - .. [[}}[url(]] - .. str - .. [=[)]]=] + .. [[\\goto{\\hyphenatedurl{]] .. str .. [[}}[url(]] .. str .. [=[)]]=] end function rst_context.reference (str) rst_context.addsetups("references") str = str:match("^`?([^`]+)`?_$") -- LPEG could render this gibberish legible but not time - --local link = rst_context.collected_references[str] or rst_context.context_references[str] - --return [[\\goto{]] .. str .. [[}[__target_]] .. rst_context.whitespace_to_underscore(str) .. "]" return [[\\RSTchoosegoto{__target_]] .. rst_context.whitespace_to_underscore(str) .. "}{" .. str .. "}" end @@ -162,7 +156,7 @@ function rst_context.anon_reference (str) str = str:match("^`?([^`]+)`?__$") rst_context.anonymous_links = rst_context.anonymous_links + 1 link = "__target_anon_" .. rst_context.anonymous_links - return [[\\goto{]] .. str .. [[}[]] .. link .. [=[]]=] + return [[\\goto{]] .. str .. [[}[url(]] .. link .. [=[)]]=] end local whitespace = S" \n\t\v" -- cgit v1.2.3