CoreFiles by mySites.guru
indent-fold.js12 lines, 653 bytes, from Joomla_3.2.6-Stable-Full_Package.zip
Raw History Compare with 3.2.5
md5
46078b2cd0a211f3c87b80433b9514da
sha1
24c68c2f5bb5dcb938389700907be2b9dd5e692a
sha256
ace22e3e441b54bbd699690e62a48932dc4fda8b0cac93c4ce1c40d396aa4569
CodeMirror.registerHelper("fold", "indent", function(cm, start) {
  var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line);
  var myIndent = CodeMirror.countColumn(firstLine, null, tabSize);
  for (var i = start.line + 1, end = cm.lineCount(); i < end; ++i) {
    var curLine = cm.getLine(i);
    if (CodeMirror.countColumn(curLine, null, tabSize) < myIndent &&
        CodeMirror.countColumn(cm.getLine(i-1), null, tabSize) > myIndent)
      return {from: CodeMirror.Pos(start.line, firstLine.length),
              to: CodeMirror.Pos(i, curLine.length)};
  }
});
CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated

The same content is in 15 releases, Joomla 3.2.0 to 3.3.6. See them all, or every version of this file.