From 2270bd8c4b2cfc5ad755b0eafe2549104cc047e7 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 14 Jul 2013 08:58:29 +0400 Subject: [PATCH] fix failing tests --- lib/ace/mode/folding/mixed.js | 2 ++ lib/ace/mode/xml_test.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ace/mode/folding/mixed.js b/lib/ace/mode/folding/mixed.js index ee0aff42..40d2cda8 100644 --- a/lib/ace/mode/folding/mixed.js +++ b/lib/ace/mode/folding/mixed.js @@ -44,6 +44,8 @@ oop.inherits(FoldMode, BaseFoldMode); this.$getMode = function(state) { + if (typeof state != "string") + state = state[0]; for (var key in this.subModes) { if (state.indexOf(key) === 0) return this.subModes[key]; diff --git a/lib/ace/mode/xml_test.js b/lib/ace/mode/xml_test.js index 7344643b..39edf633 100644 --- a/lib/ace/mode/xml_test.js +++ b/lib/ace/mode/xml_test.js @@ -51,7 +51,7 @@ module.exports = { assert.ok(tokenizer instanceof Tokenizer); var tokens = tokenizer.getLineTokens("", "start").tokens; - assert.equal("meta.tag", tokens[0].type); + assert.equal("meta.tag.punctuation.begin", tokens[0].type); }, "test: toggle comment lines should not do anything" : function() {