"[chore] migrate lua code to be compatible with 5.5 syntax.
This commit is contained in:
@@ -7,11 +7,12 @@ local F = {}
|
||||
function F.func( input, env )
|
||||
local latest_text = env.engine.context.commit_history:latest_text()
|
||||
for cand in input:iter() do
|
||||
local cand_ = cand
|
||||
if cand.text:match( '^[%a\']+[%a\']*$' ) and latest_text and #latest_text > 0 and
|
||||
latest_text:find( '^ ?[%a\']+[%a\']*$' ) then
|
||||
cand = cand:to_shadow_candidate( 'en_spacer', cand.text:gsub( '(%a+\'?%a*)', ' %1' ), cand.comment )
|
||||
cand_ = cand:to_shadow_candidate( 'en_spacer', cand.text:gsub( '(%a+\'?%a*)', ' %1' ), cand.comment )
|
||||
end
|
||||
yield( cand )
|
||||
yield( cand_ )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user