提交 3522fc00 编写于 作者: M mahmoud yousef 提交者: Erich Gamma

add emmet support for .ejs files (#4482)

上级 cf130b68
......@@ -19,7 +19,7 @@ export class EditorAccessor implements emmet.Editor {
lineStarts: number[] = null;
emmetSupportedModes = ['html', 'razor', 'css', 'less', 'scss', 'xml', 'xsl', 'jade', 'handlebars', 'hbs', 'jsx', 'tsx', 'erb', 'php', 'twig'];
emmetSupportedModes = ['html', 'razor', 'css', 'less', 'scss', 'xml', 'xsl', 'jade', 'handlebars', 'ejs', 'hbs', 'jsx', 'tsx', 'erb', 'php', 'twig'];
constructor(editor: ICommonCodeEditor) {
this.editor = editor;
......@@ -115,7 +115,7 @@ export class EditorAccessor implements emmet.Editor {
let position = this.editor.getSelection().getStartPosition();
let mode = this.editor.getModel().getModeAtPosition(position.lineNumber, position.column);
let syntax = mode.getId().split('.').pop();
if (/\b(razor|handlebars|erb|php|hbs|twig)\b/.test(syntax)) { // treat like html
if (/\b(razor|handlebars|erb|php|hbs|ejs|twig)\b/.test(syntax)) { // treat like html
return 'html';
}
if (/\b(typescriptreact|javascriptreact)\b/.test(syntax)) { // treat like tsx like jsx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册