Module:links: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 18: Line 18:
-- of the same name.
-- of the same name.
local usub = mw.ustring.sub
local usub = mw.ustring.sub
local find = mw.usting.find


local table_insert = table.insert
local table_insert = table.insert
Line 169: Line 170:
if id then
if id then
link.fragment = require("Module:utilities").make_id(lang, id)
link.fragment = require("Module:utilities").make_id(lang, id)
elseif not mw.ustring.find(link.target, "^Appendix:")
elseif not find(link.target, "^Appendix:")
and not mw.ustring.find(link.target, "^Reconstruction:") then
and not find(link.target, "^Reconstruction:") then
link.fragment = lang:getCanonicalName()
link.fragment = lang:getCanonicalName()
end
end

Navigation menu