0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 17:32:38 +00:00

Off by 1 error

This commit is contained in:
Trevor Buckner
2025-01-24 01:48:18 -05:00
parent 9f8831eed6
commit 7610466ee4

View File

@@ -192,7 +192,7 @@ const Editor = createClass({
if((this.props.renderer == 'legacy' && line.includes('\\page')) ||
(this.props.renderer == 'V3' && line.match(/^(?=\\page(?:{[^\n{}]+})?$)/))) {
if(lineNumber > 1) // Since \page is optional on first line of document,
if(lineNumber > 0) // Since \page is optional on first line of document,
editorPageCount += 1; // don't use it to increment page count; stay at 1
// add back the original class 'background' but also add the new class '.pageline'