10,735
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
end | end | ||
if not data[form] then return form end | if not data[form] then | ||
if mw.ustring.find(form, "%-%-") then | |||
local cite = mw.ustring.gsub(form, "%-%-", "") | |||
local link = m_links.full_link{ | |||
term = cite .. "-", | |||
alt = cite, | |||
language = m_languages.get_by_code("lnk-pro"), | |||
nostar = true, | |||
} | |||
if mw.ustring.find(form, "^%-%-") then | |||
return "=" .. link | |||
elseif mw.ustring.find(form, "%-%-$") then | |||
return link .. "=" | |||
else | |||
error("-- needs to be either at the beginning or the end of the argument") | |||
end | |||
else | |||
return form | |||
end | |||
end | |||
local link = data[form] | local link = data[form] |