From 0399322cf9ae8269a67b522dbaabdcfa7fa8ceb0 Mon Sep 17 00:00:00 2001 From: Aerijo Date: Mon, 4 Feb 2019 21:12:03 +1000 Subject: [PATCH] rename TS check --- src/grammar-registry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/grammar-registry.js b/src/grammar-registry.js index 594c75122..1b033286d 100644 --- a/src/grammar-registry.js +++ b/src/grammar-registry.js @@ -215,10 +215,10 @@ class GrammarRegistry { // If multiple grammars match by one of the above criteria, break ties. if (score > 0) { - const isTSgrammar = grammar instanceof TreeSitterGrammar + const isTreeSitter = grammar instanceof TreeSitterGrammar // Prefer either TextMate or Tree-sitter grammars based on the user's settings. - if (isTSgrammar) { + if (isTreeSitter) { if (this.shouldUseTreeSitterParser(grammar.scopeName)) { score += 0.1 } else { @@ -229,7 +229,7 @@ class GrammarRegistry { // Prefer grammars with matching content regexes. Prefer a grammar with no content regex // over one with a non-matching content regex. if (grammar.contentRegex) { - const contentMatch = isTSgrammar ? grammar.contentRegex.test(contents) : grammar.contentRegex.testSync(contents) + const contentMatch = isTreeSitter ? grammar.contentRegex.test(contents) : grammar.contentRegex.testSync(contents) if (contentMatch) { score += 0.05 } else {