Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The start_new_chapter callback should always execute when a chapter is started #524

Closed
mojavelinux opened this issue Aug 27, 2016 · 1 comment
Assignees
Labels

Comments

@mojavelinux
Copy link
Member

The start_new_chapter callback should always be executed when a chapter is started. Currently, this callback is not executed if the cursor is at the top of the page when the chapter begins. While this may be okay for the built-in behavior, it's a severe limitation for extensions that must perform other work at the chapter transitions.

The start_new_chapter callback will now be responsible for checking if the cursor is already at the top of a new page, including the built-in implementation.

@mojavelinux mojavelinux added this to the v1.5.0.alpha.13 milestone Aug 27, 2016
@mojavelinux mojavelinux self-assigned this Aug 27, 2016
@mojavelinux
Copy link
Member Author

Here's a sample document that reproduces the issue:

= Document Title
:doctype: book

----
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
----

== Chapter Title

content

The start_new_chapter method is never called due to the cursor placement after the listing block is rendered.

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Aug 27, 2016
… chapter transition

- ensure start_new_chapter always get executed at a chapter transition
- only start new page in start_new_page if cursor is not at page top
- minor code optimization
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Aug 28, 2016
… chapter transition

- ensure start_new_chapter always get executed at a chapter transition
- only start new page in start_new_page if cursor is not at page top
- minor code optimization
fapdash pushed a commit to vogellacompany/asciidoctor-pdf that referenced this issue Dec 13, 2016
… chapter transition (PR asciidoctor#525)

- ensure start_new_chapter always get executed at a chapter transition
- only start new page in start_new_page if cursor is not at page top
- minor code optimization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant