Diff options
Diffstat (limited to '')
-rw-r--r--custom/extensions/link-trailers.lua14
1 file changed, 7 insertions, 7 deletions
diff --git a/custom/extensions/link-trailers.lua b/custom/extensions/link-trailers.lua
index b281150..df7c661 100644
--- a/custom/extensions/link-trailers.lua
+++ b/custom/extensions/link-trailers.lua
@@ -13,9 +13,9 @@
-- Rules are tried in order and the first whose key matches the trailer, case
-- insensitively, and whose pattern matches the value wins. Each pattern is a
--- Lua pattern with a single capture and a URL where %s is replaced by that
+-- Lua pattern with a single capture and a url where %s is replaced by that
-- capture, percent-encoded. The matched run is what gets wrapped and the
--- capture is only what goes into the URL. A rule without a key applies to
+-- capture is only what goes into the url. A rule without a key applies to
-- every trailer.
--
-- Lua patterns are not regular expressions. The reference is
@@ -38,7 +38,7 @@ local rules = {
-- url = "https://www.cve.org/CVERecord?id=CVE-%s" },
}
--- A value that is nothing but one http or https URL, under any key, links to
+-- A value that is nothing but one http or https url, under any key, links to
-- itself. Set false to leave such values as text.
local link_urls = true
@@ -46,15 +46,15 @@ local link_urls = true
local key = ""
local chunks = {}
--- Percent-encode everything but the URL unreserved characters, so a captured
--- value cannot break out of the href attribute or out of the URL itself.
+-- Percent-encode everything but the url unreserved characters, so a captured
+-- value cannot break out of the href attribute or out of the url itself.
local function url_encode(s)
return (string.gsub(s, "[^%w._~-]", function(c)
return string.format("%%%02X", string.byte(c))
end))
end
--- Build one anchor from a URL template holding %s and the text to show. The
+-- Build one anchor from a url template holding %s and the text to show. The
-- replacement is a function so that a '%' in the encoded value is not taken
-- for a gsub reference.
local function make_link(url_template, capture, display)
@@ -66,7 +66,7 @@ local function make_link(url_template, capture, display)
end
-- The value is already escaped, which is also what an attribute wants, so a
--- URL only has to be kept away from the quote that closes the attribute.
+-- Url only has to be kept away from the quote that closes the attribute.
local function link_url(text)
if not link_urls or not string.find(text, "^https?://[^%s'\"]+$") then
return nil