highlight tags when cursor is before tagname
This commit is contained in:
parent
e54882db64
commit
2fc497477d
1 changed files with 4 additions and 1 deletions
|
|
@ -539,11 +539,14 @@ var Editor = function(renderer, session) {
|
|||
var iterator = new TokenIterator(self.session, pos.row, pos.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
if (!token || token.type.indexOf('tag-name') === -1) {
|
||||
if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) {
|
||||
session.removeMarker(session.$tagHighlight);
|
||||
session.$tagHighlight = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (token.type.indexOf("tag-open") != -1)
|
||||
token = iterator.stepForward();
|
||||
|
||||
var tag = token.value;
|
||||
var depth = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue