Fixed autoclosing tag behaviour in XQuery.

This commit is contained in:
William Candillon 2013-02-25 17:08:33 +01:00
commit 78a67e95a7

View file

@ -60,6 +60,8 @@ function hasType(token, type) {
var iterator = new TokenIterator(session, position.row, position.column);
var token = iterator.getCurrentToken();
var atCursor = false;
var state = JSON.parse(state).pop();
if ((token && token.value === '>') || state !== "StartTag") return;
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
do {
token = iterator.stepBackward();