1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix quadratic execution of VAUTOFIX=1 v check-md . when a long .md file has many examples, that have to be corrected.

This commit is contained in:
Delyan Angelov 2022-10-26 22:45:58 +03:00
parent 007430ef2b
commit 41c85661ef
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -645,6 +645,7 @@ fn (mut f MDFile) autofix_example(e VCodeExample, vfile string) ! {
new_lines << f.lines#[e.eline..]
f.update_examples(new_lines)!
os.rm(vfile) or {}
f.examples = f.examples.filter(it.sline >= e.sline)
return ExampleWasRewritten{}
}