提交 c6a1d671 编写于 作者: D Denis Malinochkin 提交者: Erich Gamma

Emmet tweaks: remove extra languages from conditions (#11001)

* Fix whitespaces

* Remove extra languages from condition

* Remove extra languages from tests
上级 0fafa383
......@@ -139,7 +139,7 @@ export class EditorAccessor implements emmet.Editor {
return syntax;
}
if (/\b(razor|handlebars|erb|php|hbs|ejs|twig)\b/.test(syntax)) { // treat like html
if (/\b(razor|handlebars)\b/.test(syntax)) { // treat like html
return 'html';
}
if (/\b(typescriptreact|javascriptreact)\b/.test(syntax)) { // treat tsx like jsx
......@@ -166,7 +166,7 @@ export class EditorAccessor implements emmet.Editor {
return syntax;
}
let languages = languageGrammar.split('.');
let thisLanguage = languages[languages.length-1];
let thisLanguage = languages[languages.length - 1];
if (syntax !== thisLanguage || languages.length < 2) {
return syntax;
}
......
......@@ -62,7 +62,7 @@ suite('Emmet', () => {
});
// syntaxes mapped to html, hard coded
let html = ['razor', 'handlebars', 'erb', 'php', 'hbs', 'ejs', 'twig']; // twig??
let html = ['razor', 'handlebars'];
html.forEach(each => {
testIsEnabled(each, null);
});
......@@ -103,7 +103,7 @@ suite('Emmet', () => {
});
// syntaxes mapped to html, hard coded
let html = ['razor', 'handlebars', 'erb', 'php', 'hbs', 'ejs', 'twig']; // twig??
let html = ['razor', 'handlebars'];
html.forEach(each => {
testSyntax(each, null, 'html');
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册