From 3b1db263ff5c8dcab943a0ff80f60233ce41e669 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 24 Nov 2015 23:02:58 +0400 Subject: [PATCH] fix regression: emmet commands not working in html tags --- node_modules/ace/lib/ace/ext/emmet.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/node_modules/ace/lib/ace/ext/emmet.js b/node_modules/ace/lib/ace/ext/emmet.js index 6276ce98..64358420 100644 --- a/node_modules/ace/lib/ace/ext/emmet.js +++ b/node_modules/ace/lib/ace/ext/emmet.js @@ -351,6 +351,10 @@ exports.runEmmetCommand = function runEmmetCommand(editor) { if (this.action == "expand_abbreviation_with_tab") { if (!editor.selection.isEmpty()) return false; + var pos = editor.selection.lead; + var token = editor.session.getTokenAt(pos.row, pos.column); + if (token && /\btag\b/.test(token.type)) + return false; } if (this.action == "wrap_with_abbreviation") { @@ -360,11 +364,6 @@ exports.runEmmetCommand = function runEmmetCommand(editor) { }, 0); } - var pos = editor.selection.lead; - var token = editor.session.getTokenAt(pos.row, pos.column); - if (token && /\btag\b/.test(token.type)) - return false; - var result = actions.run(this.action, editorProxy); } catch(e) { if (!emmet) {