mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
Optimize markdown workspace scanning (#152563)
* Optimize markdown workspace scanning - Adds cache for markdown file - Avoid reading non-markdown files from disk (when we expect markdown files) - Use `range.contains(pos)` instead of `range.intersects(range)` * Don't remove cached document on change We only want to invalidate the cached document when it is first opened (since the cached version is the one from disk). Otherwise we can use the live version of the doc
This commit is contained in:
@@ -260,7 +260,7 @@ class NoLinkRanges {
|
||||
|
||||
contains(range: vscode.Range): boolean {
|
||||
return this.multiline.some(interval => range.start.line >= interval[0] && range.start.line < interval[1]) ||
|
||||
this.inline.some(position => position.intersection(range));
|
||||
this.inline.some(inlineRange => inlineRange.contains(range.start));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user