mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 18:32:41 +00:00
Apply suggested regex
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
@@ -208,7 +208,7 @@ const Editor = createClass({
|
||||
}
|
||||
}
|
||||
|
||||
const textSplit = this.props.renderer == 'V3' ? '\n\\page\n' : '\\page';
|
||||
const textSplit = this.props.renderer == 'V3' ? `/^\\page$/gm` : '\\page';
|
||||
const textString = this.props.brew.text.split(textSplit).slice(0, currentPage-1).join(textSplit);
|
||||
const textPosition = textString.length;
|
||||
const lineCount = textString.match('\n') ? textString.slice(0, textPosition).split('\n').length : 0;
|
||||
|
||||
Reference in New Issue
Block a user