From 7b2486e4113015335e1b5419e863bf33d1983806 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 15:31:57 +1200 Subject: [PATCH] Use RegEx for text.split --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 8296478dd..8ddf4d6b8 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -208,7 +208,7 @@ const Editor = createClass({ } } - const textSplit = this.props.renderer == 'V3' ? `/^\\page$/gm` : '\\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;