Module:links: Difference between revisions

Jump to navigation Jump to search
m
Added "???" and "—" delinking
mNo edit summary
m (Added "???" and "—" delinking)
Line 1: Line 1:
local export = {}
local export = {}
local not_to_link = {["???"] = true, ["?"] = true, ["—"] = true, }


function export.language_link(data)
function export.language_link(data)
Line 16: Line 18:
if mw.ustring.match(mw.ustring.gsub(link, " ", " "),"([^%#]+)") == mw.title.getCurrentTitle().prefixedText and not data.nobold then
if mw.ustring.match(mw.ustring.gsub(link, " ", " "),"([^%#]+)") == mw.title.getCurrentTitle().prefixedText and not data.nobold then
return "<b>" .. alt .. "</b>"
return "<b>" .. alt .. "</b>"
elseif not_to_link[link] then
return alt
else
else
return "[[" .. link .. "|" .. alt .. "]]"
return "[[" .. link .. "|" .. alt .. "]]"

Navigation menu