Skip to content

Fix TOC issues with pandoc 2.18 in gitbook() #1329

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

Merged
merged 10 commits into from
Apr 6, 2022
Merged

Fix TOC issues with pandoc 2.18 in gitbook() #1329

merged 10 commits into from
Apr 6, 2022

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Apr 6, 2022

Fixes #1327 and close #1326 by dealing with empty spans introduced in gitbook.

basically for #1327 we had our usual regex issue following Pandoc 2.187 changes. There was the PART issue, but also the unnumbered chapter not being dealt with correctly.

We did not detect sooner because we did not have tests for this. So I took the time to add some more test for this - took me a while to master more XPATH but that will be useful for further tests.

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks a lot!

@cderv cderv changed the title Fix PART feature for pandoc 2.18 with HTML and add tests Fix TOC issues with pandoc 2.18 in gitbook() Apr 6, 2022
@cderv cderv merged commit 1f65a1b into main Apr 6, 2022
@cderv cderv deleted the fix/anchor-span branch April 6, 2022 16:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PART is broken with Pandoc 2.18 New and disturbing span after part
2 participants