Skip to content

Commit

Permalink
Fix page break value comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Aug 21, 2021
1 parent 98c38c9 commit 89b6fe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weasyprint/layout/__init__.py
Expand Up @@ -38,11 +38,11 @@ def initialize_page_maker(context, root_box):

# TODO: take care of text direction and writing mode
# https://www.w3.org/TR/css3-page/#progression
if page_break in 'right':
if page_break == 'right':
right_page = True
elif page_break == 'left':
right_page = False
elif page_break in 'recto':
elif page_break == 'recto':
right_page = root_box.style['direction'] == 'ltr'
elif page_break == 'verso':
right_page = root_box.style['direction'] == 'rtl'
Expand Down

0 comments on commit 89b6fe3

Please sign in to comment.