kopia lustrzana https://github.com/c9/core
fix regression: emmet commands not working in html tags
rodzic
844091f2d9
commit
3b1db263ff
|
@ -351,6 +351,10 @@ exports.runEmmetCommand = function runEmmetCommand(editor) {
|
||||||
if (this.action == "expand_abbreviation_with_tab") {
|
if (this.action == "expand_abbreviation_with_tab") {
|
||||||
if (!editor.selection.isEmpty())
|
if (!editor.selection.isEmpty())
|
||||||
return false;
|
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") {
|
if (this.action == "wrap_with_abbreviation") {
|
||||||
|
@ -360,11 +364,6 @@ exports.runEmmetCommand = function runEmmetCommand(editor) {
|
||||||
}, 0);
|
}, 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);
|
var result = actions.run(this.action, editorProxy);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
if (!emmet) {
|
if (!emmet) {
|
||||||
|
|
Ładowanie…
Reference in New Issue