0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 11:52:44 +00:00

Push pageCount to NewPage and EditPage

This commit is contained in:
G.Ambatte
2021-08-17 17:36:26 +12:00
parent 0fd7921a50
commit cfb98986cd
4 changed files with 17 additions and 14 deletions

View File

@@ -161,6 +161,8 @@ const NewPage = createClass({
brew.text = brew.text.slice(index + 5);
};
brew.pageCount=((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page/gm)) || []).length + 1;
if(this.state.saveGoogle) {
const res = await request
.post('/api/newGoogle/')