Module:grc-accent: difference between revisions

Content deleted Content added
mNo edit summary
Atelaes (talk | contribs)
This works, but doesn't handle diphthongs.
Line 28:
 
function export.ult(frame)
local qargs = frame:getParent().args[1]
local q = args[1]
for i = mw.ustring.len(q),1,-1 do
if acute[mw.ustring.sub(q,i,i)] then
Line 38 ⟶ 39:
 
function export.penult(frame)
local qargs = frame:getParent().args[1]
local q = args[1]
local flag = false
for i = q:mw.ustring.len(q),1,-1 do
iflocal acute[q:currentVowel = mw.ustring.sub(q, i, i)] then
if acute[currentVowel] then
if flag then
return q:mw.ustring.sub(q, 1, i-1)..acute[icurrentVowel]..q:mw.ustring.sub(q, i+1,q:len())
else
flag = true