0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Allow empty braces: \page{}

This commit is contained in:
Trevor Buckner
2025-01-27 23:27:03 -05:00
parent f1ff032e1e
commit be18843b09
2 changed files with 2 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ const BrewRenderer = (props)=>{
if(props.renderer == 'legacy') {
rawPages = props.text.split('\\page');
} else {
rawPages = props.text.split(/^(?=\\page(?:{[^\n{}]+})?$)/gm);
rawPages = props.text.split(/^(?=\\page(?:{[^\n{}]*})?$)/gm);
}
const handlePageVisibilityChange = (pageNum, isVisible, isCenter)=>{

View File

@@ -12,7 +12,7 @@ const MetadataEditor = require('./metadataEditor/metadataEditor.jsx');
const EDITOR_THEME_KEY = 'HOMEBREWERY-EDITOR-THEME';
const PAGEBREAK_REGEX_V3 = /^(?=\\page(?:{[^\n{}]+})?$)/m;
const PAGEBREAK_REGEX_V3 = /^(?=\\page(?:{[^\n{}]*})?$)/m;
const SNIPPETBAR_HEIGHT = 25;
const DEFAULT_STYLE_TEXT = dedent`
/*=======--- Example CSS styling ---=======*/
@@ -22,8 +22,6 @@ const DEFAULT_STYLE_TEXT = dedent`
color: black;
}`;
let isJumping = false;
const Editor = createClass({