diff --git a/extensions/handlebars/language-configuration.json b/extensions/handlebars/language-configuration.json index 055b361a333..c71a5655d5e 100644 --- a/extensions/handlebars/language-configuration.json +++ b/extensions/handlebars/language-configuration.json @@ -14,8 +14,7 @@ { "open": "[", "close": "]"}, { "open": "(", "close": ")" }, { "open": "'", "close": "'" }, - { "open": "\"", "close": "\"" }, - { "open": "<", "close": ">" } + { "open": "\"", "close": "\"" } ], "surroundingPairs": [ { "open": "'", "close": "'" }, diff --git a/extensions/html/language-configuration.json b/extensions/html/language-configuration.json index ac43f355121..060646fc820 100644 --- a/extensions/html/language-configuration.json +++ b/extensions/html/language-configuration.json @@ -13,8 +13,7 @@ { "open": "[", "close": "]"}, { "open": "(", "close": ")" }, { "open": "'", "close": "'" }, - { "open": "\"", "close": "\"" }, - { "open": "<", "close": ">" } + { "open": "\"", "close": "\"" } ], "surroundingPairs": [ { "open": "'", "close": "'" }, diff --git a/extensions/razor/language-configuration.json b/extensions/razor/language-configuration.json index a4ae1367781..e2a49bcbd8e 100644 --- a/extensions/razor/language-configuration.json +++ b/extensions/razor/language-configuration.json @@ -13,8 +13,7 @@ { "open": "[", "close": "]"}, { "open": "(", "close": ")" }, { "open": "'", "close": "'" }, - { "open": "\"", "close": "\"" }, - { "open": "<", "close": ">" } + { "open": "\"", "close": "\"" } ], "surroundingPairs": [ { "open": "'", "close": "'" }, diff --git a/src/vs/workbench/parts/emmet/node/editorAccessor.ts b/src/vs/workbench/parts/emmet/node/editorAccessor.ts index 67f8649bec0..3d4ffb25c7a 100644 --- a/src/vs/workbench/parts/emmet/node/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/node/editorAccessor.ts @@ -80,7 +80,7 @@ export class EditorAccessor implements emmet.Editor { let startPosition = this.getPositionFromOffset(start); let endPosition = this.getPositionFromOffset(end); - // test if < or after the replace range. Either replace these too, or block the expansion var currentLine = this._editor.getModel().getLineContent(startPosition.lineNumber).substr(0, startPosition.column - 1); // content before the replaced range var match = currentLine.match(/<[/]?$/); if (match) { @@ -91,6 +91,15 @@ export class EditorAccessor implements emmet.Editor { } } + // test if > is located after the replace range. Either replace these too, or block the expansion + if (this._editor.getModel().getLineContent(endPosition.lineNumber).substr(endPosition.column-1, endPosition.column) ==='>') { + if (strings.endsWith(value, '>')) { + endPosition = { lineNumber: endPosition.lineNumber, column: endPosition.column + 1 }; + } else { + return; // ignore + } + } + // If this is the first edit in this "transaction", push an undo stop before them if (!this._hasMadeEdits) { this._hasMadeEdits = true;