From 295ae4dc81c77dbd2f00d8d3d40491df341d202c Mon Sep 17 00:00:00 2001 From: sevin7676 Date: Sat, 18 Apr 2015 08:25:47 -0400 Subject: [PATCH] make pound optional for region --- lib/ace/mode/folding/cstyle.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ace/mode/folding/cstyle.js b/lib/ace/mode/folding/cstyle.js index 75926331..6a6abca7 100644 --- a/lib/ace/mode/folding/cstyle.js +++ b/lib/ace/mode/folding/cstyle.js @@ -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);