1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00
This commit is contained in:
Étienne Fildadut 2021-11-27 14:37:55 +01:00
parent 12d2aa3e82
commit 14d348bad9
3 changed files with 28 additions and 28 deletions

View file

@ -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("^(.- ) *$")