make pound optional for region

This commit is contained in:
sevin7676 2015-04-18 08:25:47 -04:00
commit 295ae4dc81

View file

@ -53,7 +53,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
this.singleLineBlockCommentRe= /^\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;
@ -69,6 +69,8 @@ oop.inherits(FoldMode, BaseFoldMode);
*
* @example tripleStarFoldingSection
* /*** this folds even though 1 line because it has 3 stars ***[/]
*
* @note the pound symbol for region tags is optional
*/
this.getFoldWidget = function(session, foldStyle, row) {
var line = session.getLine(row);