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.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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue