10,731
edits
TheNightAvl (talk | contribs) mNo edit summary |
TheNightAvl (talk | contribs) mNo edit summary |
||
Line 22: | Line 22: | ||
while #to_process > 0 do | while #to_process > 0 do | ||
if mw.ustring.match(to_process, "%*[^%*]+%*") then | if mw.ustring.match(to_process, "%*[^%*]+%*") then | ||
local pre = mw.ustring. | local pre = mw.ustring.match(to_process, "^([^%*]+)%*") | ||
local translink = mw.ustring. | local translink = mw.ustring.match(to_process, "%*([^%*]+)%*") | ||
to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 2) | to_process = mw.ustring.sub(to_process, mw.ustring.len(pre) + mw.ustring.len(translink) + 2) | ||
translink = m_links.full_link{term = translink, language = language} | translink = m_links.full_link{term = translink, language = language} | ||
bytext = bytext .. pre .. | bytext = bytext .. pre .. translink | ||
else | else | ||
bytext = bytext .. to_process | bytext = bytext .. to_process |