Module:Hatnote: Difference between revisions

fix colon-removing pattern
m>Mr. Stradivarius
(properly deal with links escaped using the colon trick)
m>Mr. Stradivarius
(fix colon-removing pattern)
Line 59: Line 59:
-- colon trick for categories and files, as otherwise category links
-- colon trick for categories and files, as otherwise category links
-- categorise the page and file links display the file.
-- categorise the page and file links display the file.
link = link:match('^:?(.*)') -- Remove initial colon if specified.
link = link:match('^:(.*)') or link -- Remove initial colon if specified.
local namespace = findNamespaceId(link)
local namespace = findNamespaceId(link)
local colon
local colon
Anonymous user