add folding for paragraph

This commit is contained in:
Daniel Felder 2014-08-11 11:54:15 +00:00
commit b8c111b832

View file

@ -42,7 +42,7 @@ oop.inherits(FoldMode, BaseFoldMode);
(function() {
this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/;
this.foldingStartMarker = /^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/;
this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/;
this.getFoldWidgetRange = function(session, foldStyle, row) {
@ -119,7 +119,7 @@ oop.inherits(FoldMode, BaseFoldMode);
};
this.latexSection = function(session, row, column) {
var keywords = ["\\subsection", "\\section", "\\begin", "\\end"];
var keywords = ["\\subsection", "\\section", "\\begin", "\\end", "\\paragraph"];
var stream = new TokenIterator(session, row, column);
var token = stream.getCurrentToken();