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)