package
This commit is contained in:
parent
b8f15cb81b
commit
63e037f544
17 changed files with 75 additions and 60 deletions
|
|
@ -368,7 +368,7 @@ var oop = require("../../lib/oop");
|
|||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(markers) {
|
||||
this.foldingStartMarker = new RegExp("(?:(\\[)|" + markers + ")(?:\\s*)(?:#.*)?$");
|
||||
this.foldingStartMarker = new RegExp("(?:([\\[{])|(" + markers + "))(?:\\s*)(?:#.*)?$");
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
|
|
@ -380,8 +380,9 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
if (match) {
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, match.index);
|
||||
|
||||
return this.indentationBlock(session, row, match.index + 1);
|
||||
if (match[2])
|
||||
return this.indentationBlock(session, row, match.index + match[2].length);
|
||||
return this.indentationBlock(session, row);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue