X7ROOT File Manager
Current Path:
/home/notabjze/narcev.com/media/vendor/codemirror/addon/fold
home
/
notabjze
/
narcev.com
/
media
/
vendor
/
codemirror
/
addon
/
fold
/
ðŸ“
..
📄
brace-fold.js
(4 KB)
📄
brace-fold.min.js
(1.91 KB)
📄
brace-fold.min.js.gz
(886 B)
📄
comment-fold.js
(2.11 KB)
📄
comment-fold.min.js
(1023 B)
📄
comment-fold.min.js.gz
(570 B)
📄
foldcode.js
(4.87 KB)
📄
foldcode.min.js
(2.54 KB)
📄
foldcode.min.js.gz
(1.08 KB)
📄
foldgutter.css
(435 B)
📄
foldgutter.js
(5.24 KB)
📄
foldgutter.min.js
(2.68 KB)
📄
foldgutter.min.js.gz
(1.09 KB)
📄
indent-fold.js
(1.63 KB)
📄
indent-fold.min.js
(654 B)
📄
indent-fold.min.js.gz
(408 B)
📄
markdown-fold.js
(1.57 KB)
📄
markdown-fold.min.js
(713 B)
📄
markdown-fold.min.js.gz
(421 B)
📄
xml-fold.js
(6.54 KB)
📄
xml-fold.min.js
(3.33 KB)
📄
xml-fold.min.js.gz
(1.26 KB)
Editing: comment-fold.js
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.registerGlobalHelper("fold", "comment", function(mode) { return mode.blockCommentStart && mode.blockCommentEnd; }, function(cm, start) { var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd; if (!startToken || !endToken) return; var line = start.line, lineText = cm.getLine(line); var startCh; for (var at = start.ch, pass = 0;;) { var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1); if (found == -1) { if (pass == 1) return; pass = 1; at = lineText.length; continue; } if (pass == 1 && found < start.ch) return; if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) && (found == 0 || lineText.slice(found - endToken.length, found) == endToken || !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) { startCh = found + startToken.length; break; } at = found - 1; } var depth = 1, lastLine = cm.lastLine(), end, endCh; outer: for (var i = line; i <= lastLine; ++i) { var text = cm.getLine(i), pos = i == line ? startCh : 0; for (;;) { var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos); if (nextOpen < 0) nextOpen = text.length; if (nextClose < 0) nextClose = text.length; pos = Math.min(nextOpen, nextClose); if (pos == text.length) break; if (pos == nextOpen) ++depth; else if (!--depth) { end = i; endCh = pos; break outer; } ++pos; } } if (end == null || line == end && endCh == startCh) return; return {from: CodeMirror.Pos(line, startCh), to: CodeMirror.Pos(end, endCh)}; }); });
Upload File
Create Folder