mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 07:02:39 +00:00
@@ -2,7 +2,6 @@ module.exports = {
|
|||||||
registerHomebreweryHelper : function(CodeMirror) {
|
registerHomebreweryHelper : function(CodeMirror) {
|
||||||
CodeMirror.registerHelper('fold', 'homebrewery', function(cm, start) {
|
CodeMirror.registerHelper('fold', 'homebrewery', function(cm, start) {
|
||||||
const matcher = /^\\page.*/;
|
const matcher = /^\\page.*/;
|
||||||
const firstLine = cm.getLine(start.line);
|
|
||||||
const prevLine = cm.getLine(start.line - 1);
|
const prevLine = cm.getLine(start.line - 1);
|
||||||
|
|
||||||
if(start.line === cm.firstLine() || prevLine.match(matcher)) {
|
if(start.line === cm.firstLine() || prevLine.match(matcher)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user