diff options
Diffstat (limited to '')
-rw-r--r--[-rwxr-xr-x] | public/vendor/codemirror/addon/fold/comment-fold.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/vendor/codemirror/addon/fold/comment-fold.js b/public/vendor/codemirror/addon/fold/comment-fold.js index b75db7ea..60fa3e43 100755..100644 --- a/public/vendor/codemirror/addon/fold/comment-fold.js +++ b/public/vendor/codemirror/addon/fold/comment-fold.js @@ -28,7 +28,9 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) { continue; } if (pass == 1 && found < start.ch) return; - if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) { + if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) && + (lineText.slice(found - endToken.length, found) == endToken || + !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) { startCh = found + startToken.length; break; } |