From 1490eafdd26a576dcc3832d1811802c0162dfe84 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 30 Jul 2016 12:25:24 +0800 Subject: Update CodeMirror to version 5.17.1 --- public/vendor/codemirror/addon/fold/comment-fold.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/vendor/codemirror/addon/fold/comment-fold.js') diff --git a/public/vendor/codemirror/addon/fold/comment-fold.js b/public/vendor/codemirror/addon/fold/comment-fold.js index 60fa3e43..e8d800eb 100644 --- a/public/vendor/codemirror/addon/fold/comment-fold.js +++ b/public/vendor/codemirror/addon/fold/comment-fold.js @@ -29,7 +29,7 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) { } if (pass == 1 && found < start.ch) return; if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) && - (lineText.slice(found - endToken.length, found) == endToken || + (found == 0 || lineText.slice(found - endToken.length, found) == endToken || !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) { startCh = found + startToken.length; break; -- cgit v1.2.3