fix indentation
This commit is contained in:
parent
f7947af505
commit
3d41699d8f
@ -4,10 +4,10 @@ local function backspace(text)
|
||||
local byteoffset = utf8.offset(text, -1)
|
||||
|
||||
if byteoffset then
|
||||
-- remove the last UTF-8 character.
|
||||
-- string.sub operates on bytes rather than UTF-8 characters,
|
||||
-- so we couldn't do string.sub(text, 1, -2).
|
||||
return string.sub(text, 1, byteoffset - 1)
|
||||
-- remove the last UTF-8 character.
|
||||
-- string.sub operates on bytes rather than UTF-8 characters,
|
||||
-- so we couldn't do string.sub(text, 1, -2).
|
||||
return string.sub(text, 1, byteoffset - 1)
|
||||
end
|
||||
|
||||
return ""
|
||||
|
Loading…
Reference in New Issue
Block a user