Module:links: Difference between revisions

46 bytes removed ,  25 December 2023
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
m (Added "???" and "—" delinking)
mNo edit summary
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 18: Line 16:
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
elseif mw.ustring.match(link,"^([%?-–—]+)$") then
return alt
return alt
else
else