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:
parent
007430ef2b
commit
41c85661ef
@ -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{}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user