Module:head: Difference between revisions

No change in size ,  10 December 2023
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Tag: Reverted
Line 63: Line 63:
local temp_links = {}
local temp_links = {}
if mw.ustring.find(inflection[i], "%*") then
if mw.ustring.find(inflection[i], "%*") then
local before = mw.ustring.match(inflection[i], "^([^%*]+)%S?%*") or ""
local before = mw.ustring.match(inflection[i], "^([^%*]+)%S*%*") or ""
local after = mw.ustring.match(inflection[i], "%*%S?([^%*]+)$") or ""
local after = mw.ustring.match(inflection[i], "%*%S*([^%*]+)$") or ""
if before ~= "" then before = m_links.full_link({term = before, language = data.language}, "bold") end
if before ~= "" then before = m_links.full_link({term = before, language = data.language}, "bold") end
if after ~= "" then after = m_links.full_link({term = after, language = data.language}, "bold") end
if after ~= "" then after = m_links.full_link({term = after, language = data.language}, "bold") end
local head_temp = mw.ustring.match(inflection[i], "(%S?%*%S?)")
local head_temp = mw.ustring.match(inflection[i], "(%S*%*%S*)")
head_temp = mw.ustring.gsub(head_temp, "%*", "<b>" .. data.term .. "</b>")
head_temp = mw.ustring.gsub(head_temp, "%*", "<b>" .. data.term .. "</b>")