Module:Links

local m = {} function m.wikilink(title, text) if title:inNamespace('Category') or title:inNamespace('File') then -- Link to the category or file page instead of categorizing or including the file. -- To categorize, use utils.categorize. return "" .. text .. "" else return "" .. text .. "" end end function m.external_link(uri, text) return "[" .. tostring(uri) .. " " .. text .. "]" end -- This function wraps the link in a span with class plainlinks. -- See https://www.mediawiki.org/wiki/Manual:Plainlinks for more information. function m.plain_external_link(...) return tostring(mw.html.create('span')           :addClass('plainlinks')            :wikitext(m.external_link(...))        ) end return m