Module:links: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 14: Line 14:
link = link .. "#" .. string.gsub(data.language.name, " ", "_")
link = link .. "#" .. string.gsub(data.language.name, " ", "_")
end
end
if mw.ustring.match(mw.ustring.gsub(link, " ", " "),"([^%#]+)") == mw.title.getCurrentTitle().prefixedText and not data.nobold then
local term = mw.ustring.match(mw.ustring.gsub(link, " ", " "),"([^%#]+)")
if term == mw.title.getCurrentTitle().prefixedText and not data.nobold then
return "<b>" .. alt .. "</b>"
return "<b>" .. alt .. "</b>"
elseif mw.ustring.find(link, "^%?+$") or mw.ustring.find(link, "^[%-–—]$") then
elseif mw.ustring.match(term, "^[%?%-–—]+$") or mw.ustring.match(term, ":[%?%-–—]+$") then
return alt
return alt
else
else

Navigation menu