Skip to content

Commit

Permalink
fix: Named page wrongly applied to blank pages
Browse files Browse the repository at this point in the history
- fix #1309
  • Loading branch information
MurakamiShinyu committed May 3, 2024
1 parent 965b748 commit 07b6a24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/vivliostyle/ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,9 @@ export class StyleInstance
(page.isBlankPage
? this.styler.cascade.previousPageType
: this.styler.cascade.currentPageType) ?? "";
// Fix for issue #1309
this.styler.cascade.previousPageType =
this.styler.cascade.currentPageType;
}

this.clearScope(this.style.pageScope);
Expand Down
7 changes: 5 additions & 2 deletions packages/core/src/vivliostyle/vgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,11 @@ export class ViewFactory
) {
this.nodeContext.breakBefore = "page";
}
this.styler.cascade.previousPageType =
this.styler.cascade.currentPageType;
// Fix for issue #1309
if (pageType !== this.styler.cascade.previousPageType) {
this.styler.cascade.previousPageType =
this.styler.cascade.currentPageType;
}
this.styler.cascade.currentPageType = pageType;
}
}
Expand Down

0 comments on commit 07b6a24

Please sign in to comment.