From 5c30d861fa538502393e897363fdcee52c049595 Mon Sep 17 00:00:00 2001 From: William Candillon Date: Wed, 6 Feb 2013 13:17:03 +0100 Subject: [PATCH] Fix tag completion bug. --- lib/ace/mode/behaviour/xquery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ace/mode/behaviour/xquery.js b/lib/ace/mode/behaviour/xquery.js index 5df04cd2..1c77217a 100644 --- a/lib/ace/mode/behaviour/xquery.js +++ b/lib/ace/mode/behaviour/xquery.js @@ -67,7 +67,8 @@ function hasType(token, type) { } else { atCursor = true; } - if (!token || !hasType(token, 'meta.tag') || iterator.stepBackward().value.match('/')) { + var previous = iterator.stepBackward(); + if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { return } var tag = token.value.substring(1);