mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Untypo
This commit is contained in:
parent
12d2aa3e82
commit
14d348bad9
3 changed files with 28 additions and 28 deletions
|
|
@ -18,9 +18,9 @@ local function post_process_text(state, text)
|
|||
for i=1, #text-1 do
|
||||
local a, b = text[i], text[i+1]
|
||||
local na = #a.text:match(" *$")
|
||||
local nb = #b.text:match(" *$")
|
||||
local nb = #b.text:match("^ *")
|
||||
if na > 0 and nb > 0 then -- remove duplicated spaces from second element first
|
||||
b.text = b.text:match("^(.-) *$")
|
||||
b.text = b.text:match("^ *(.-)$")
|
||||
end
|
||||
if na > 1 then
|
||||
a.text = a.text:match("^(.- ) *$")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue