Module:ábḫ-ipa: Difference between revisions
Jump to navigation
Jump to search
(Created page with "local export = {} function export.convert(frame) local word = type(frame) == "table" and frame.args[1] or frame word = mw.ustring.gsub(word, "([aeiou]+)", "|%1|") retu...") |
No edit summary |
||
Line 4: | Line 4: | ||
local word = type(frame) == "table" and frame.args[1] or frame | local word = type(frame) == "table" and frame.args[1] or frame | ||
word = mw. | word = mw.text.split(word, "", true) | ||
return | result = {} | ||
for i,val in ipairs(word) do | |||
if val == "b" then | |||
if not mw.ustring.match(word[i], "[m]") then | |||
table.insert(result, "β") | |||
end | |||
else | |||
table.insert(result, val) | |||
end | |||
end | |||
return table.concat(result) | |||
end | end | ||
return export | return export |
Revision as of 21:26, 21 February 2020
- The following documentation is located at Module:ábḫ-ipa/doc.[edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
local export = {}
function export.convert(frame)
local word = type(frame) == "table" and frame.args[1] or frame
word = mw.text.split(word, "", true)
result = {}
for i,val in ipairs(word) do
if val == "b" then
if not mw.ustring.match(word[i], "[m]") then
table.insert(result, "β")
end
else
table.insert(result, val)
end
end
return table.concat(result)
end
return export