Module:User:AmazingJus/af: difference between revisions

Content deleted Content added
AmazingJus (talk | contribs)
No edit summary
AmazingJus (talk | contribs)
No edit summary
Line 329:
pattern = affix_type == "pre" and "^" .. affix[1] or affix[1] .. "$"
end
return patterntrue and find(string, pattern) or false
end
 
Line 338:
if is_valid_affix(string, affix, pos, "pre", depth) then
if depth == 1 then
string = rsub(string, "^" .. affix[1] .. "%-", affix[1] .. ">")
else
string = rsub(string, "^" .. affix[1], affix[1] .. ">")
Line 349:
if is_valid_affix(string, affix, pos, "suf", depth) then
if depth == 1 then
string = rsub(string, "%-" .. affix[1] .. "$", "<" .. affix[1])
else
string = rsub(string, affix[1] .. "$", "<" .. affix[1])