From ed320af6f4b0fd9f90ca4506c64fc7e2445a3324 Mon Sep 17 00:00:00 2001 From: Daniel Felder Date: Mon, 11 Aug 2014 12:21:20 +0000 Subject: [PATCH] fix code folding in equation mode --- lib/ace/mode/folding/latex.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/mode/folding/latex.js b/lib/ace/mode/folding/latex.js index be950f1d..6f20b22e 100644 --- a/lib/ace/mode/folding/latex.js +++ b/lib/ace/mode/folding/latex.js @@ -74,7 +74,7 @@ oop.inherits(FoldMode, BaseFoldMode); var stream = new TokenIterator(session, row, column); var token = stream.getCurrentToken(); - if (!token || token.type !== "storage.type") + if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape")) return; var val = token.value; @@ -96,7 +96,7 @@ oop.inherits(FoldMode, BaseFoldMode); stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; while(token = stream.step()) { - if (token.type !== "storage.type") + if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape")) continue; var level = keywords[token.value]; if (!level)