提交 239b199f 编写于 作者: R Ramya Rao 提交者: GitHub

Use patched emmet to support svg and orphaned quote bug (#19655)

上级 fbd2c511
......@@ -89,8 +89,8 @@
},
"emmet": {
"version": "1.3.1",
"from": "emmet@1.3.1",
"resolved": "https://registry.npmjs.org/emmet/-/emmet-1.3.1.tgz"
"from": "ramya-rao-a/emmet#vscode",
"resolved": "git+https://github.com/ramya-rao-a/emmet.git#1d75a37a8c75795e103dae72b897eb0790c523ae"
},
"expand-brackets": {
"version": "0.1.5",
......
......@@ -33,7 +33,7 @@ export class EditorAccessor implements emmet.Editor {
private _hasMadeEdits: boolean;
private emmetSupportedModes = ['html', 'css', 'xml', 'xsl', 'haml', 'jade', 'jsx', 'slim', 'scss', 'sass', 'less', 'stylus', 'styl'];
private emmetSupportedModes = ['html', 'css', 'xml', 'xsl', 'haml', 'jade', 'jsx', 'slim', 'scss', 'sass', 'less', 'stylus', 'styl', 'svg'];
constructor(languageIdentifierResolver: ILanguageIdentifierResolver, editor: ICommonCodeEditor, syntaxProfiles: any, excludedLanguages: String[], grammars: IGrammarContributions) {
this._languageIdentifierResolver = languageIdentifierResolver;
......@@ -45,6 +45,7 @@ export class EditorAccessor implements emmet.Editor {
}
public isEmmetEnabledMode(): boolean {
return this.emmetSupportedModes.indexOf(this.getSyntax()) !== -1;
}
......
......@@ -268,8 +268,13 @@ export class BasicEmmetEditorAction extends EmmetEditorAction {
}
public runEmmetAction(accessor: ServicesAccessor, ctx: EmmetActionContext) {
if (!ctx.emmet.run(this.emmetActionName, ctx.editorAccessor)) {
try {
if (!ctx.emmet.run(this.emmetActionName, ctx.editorAccessor)) {
this.noExpansionOccurred(ctx.editor);
}
} catch (err) {
this.noExpansionOccurred(ctx.editor);
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册