Add comment to explain unusual naming and remove ending whitespace
This commit is contained in:
parent
41df1f265f
commit
c1a8e77760
1 changed files with 6 additions and 4 deletions
|
|
@ -54,6 +54,8 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
|
||||
|
||||
//prevent naming conflict with any modes that inherit from cstyle and override this (like csharp)
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
|
||||
/**
|
||||
|
|
@ -61,10 +63,10 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
*
|
||||
* @example lineCommentRegionStart
|
||||
* //#region [optional description]
|
||||
*
|
||||
*
|
||||
* @example blockCommentRegionStart
|
||||
* /*#region [optional description] *[/]
|
||||
*
|
||||
*
|
||||
* @example tripleStarFoldingSection
|
||||
* /*** this folds even though 1 line because it has 3 stars ***[/]
|
||||
*/
|
||||
|
|
@ -73,13 +75,13 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
// 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 "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue