mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 14:02:41 +00:00
Adjust \page check for renderer
This commit is contained in:
@@ -98,7 +98,11 @@ const Editor = createClass({
|
|||||||
getCurrentPage : function(){
|
getCurrentPage : function(){
|
||||||
const lines = this.props.brew.text.split('\n').slice(0, this.refs.codeEditor.getCursorPosition().line + 1);
|
const lines = this.props.brew.text.split('\n').slice(0, this.refs.codeEditor.getCursorPosition().line + 1);
|
||||||
return _.reduce(lines, (r, line)=>{
|
return _.reduce(lines, (r, line)=>{
|
||||||
if(line.indexOf('\\page') !== -1) r++;
|
if(
|
||||||
|
(this.props.renderer == 'legacy' && line.indexOf('\\page') !== -1)
|
||||||
|
||
|
||||||
|
(this.props.renderer == 'V3' && line.match(/^\\page$/))
|
||||||
|
) r++;
|
||||||
return r;
|
return r;
|
||||||
}, 1);
|
}, 1);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user