summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rst_context.lua10
1 files 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"