Add comment to explain unusual naming and remove ending whitespace

This commit is contained in:
sevin7676 2014-11-28 08:18:33 -05:00
commit c1a8e77760

View file

@ -54,6 +54,8 @@ oop.inherits(FoldMode, BaseFoldMode);
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
//prevent naming conflict with any modes that inherit from cstyle and override this (like csharp)
this._getFoldWidgetBase = this.getFoldWidget; this._getFoldWidgetBase = this.getFoldWidget;
/** /**
@ -61,10 +63,10 @@ oop.inherits(FoldMode, BaseFoldMode);
* *
* @example lineCommentRegionStart * @example lineCommentRegionStart
* //#region [optional description] * //#region [optional description]
* *
* @example blockCommentRegionStart * @example blockCommentRegionStart
* /*#region [optional description] *[/] * /*#region [optional description] *[/]
* *
* @example tripleStarFoldingSection * @example tripleStarFoldingSection
* /*** this folds even though 1 line because it has 3 stars ***[/] * /*** this folds even though 1 line because it has 3 stars ***[/]
*/ */
@ -73,13 +75,13 @@ oop.inherits(FoldMode, BaseFoldMode);
if (this.singleLineBlockCommentRe.test(line)) { if (this.singleLineBlockCommentRe.test(line)) {
// No widget for single line block comment unless region or triple star // No widget for single line block comment unless region or triple star
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
return ""; return "";
} }
var fw = this._getFoldWidgetBase(session, foldStyle, row); var fw = this._getFoldWidgetBase(session, foldStyle, row);
if (!fw && this.startRegionRe.test(line)) if (!fw && this.startRegionRe.test(line))
return "start"; // lineCommentRegionStart return "start"; // lineCommentRegionStart
return fw; return fw;