10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 54: | Line 54: | ||
i_ipa = mw.ustring.gsub(i_ipa, "(%s+)(%<%/span%>)(%S)", "%2%1%3") | i_ipa = mw.ustring.gsub(i_ipa, "(%s+)(%<%/span%>)(%S)", "%2%1%3") | ||
i_ipa = mw.ustring.gsub(i_ipa, '(%S+)(%<span class%=%"' .. class .. '%"%>)(%s)', "%1%3%2") | i_ipa = mw.ustring.gsub(i_ipa, '(%S+)(%<span class%=%"' .. class .. '%"%>)(%s)', "%1%3%2") | ||
if linked then | |||
-- there's a reason this isn't merged with the linked condition below but I can't be bothered to explain why | |||
i_ipa = mw.ustring.gsub(i_ipa, "(%<%/span%>)", "]]%1") | |||
i_ipa = mw.ustring.gsub(i_ipa, '(.)(%<span class%=%"' .. class .. '%"%>)', "%1%2[[" .. language_pron .. "|") | |||
end | |||
else | else | ||
i_ipa = get_SAMPAd(i_ipa) | i_ipa = get_SAMPAd(i_ipa) | ||
Line 59: | Line 64: | ||
if linked then | if linked then | ||
out = out .. "[[" .. language_pron .. "|" .. i_ipa .. "]]" | out = out .. "[[" .. language_pron .. "|" .. i_ipa .. "]]" | ||
else | else | ||
out = out .. i_ipa | out = out .. i_ipa |