-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Check and adapt to new --number-sections
in Pandoc 3.1.12
#1455
Comments
Regarding the change: This is due to a Pandoc breaking change (probably this commit Now when Here is a simple test showing this pandoc::pandoc_convert(
version = "3.1.11.1",
text = c(
"# One {-}",
"",
"# Two"
),
to = "html",
args = "--number-sections"
)
#> <h1 class="unnumbered" id="one">One</h1>
#> <h1 data-number="1" id="two"><span
#> class="header-section-number">1</span> Two</h1>
pandoc::pandoc_convert(
version = "3.1.12",
text = c(
"# One {-}",
"",
"# Two"
),
to = "html",
args = "--number-sections"
)
#> <h1 class="unnumbered" id="one">One</h1>
#> <h1 data-number="2" id="two"><span
#> class="header-section-number">2</span> Two</h1> The second header is now numbered two, and not 1, while the fist is just unnumbered. @yihui I plan to ask the question on Pandoc's community if this is really expecting change - it is quite suprising to me, and this may require us to process the headers and renumber everything - or leverage new pandoc's feature (chunked HTML for example) This is quite an important breaking change for us. Edit: asked at jgm/pandoc#9513 |
Thanks for reporting the issue to Pandoc! Since this has been confirmed as a Pandoc bug, I think we just need to wait for the upstream fix (I feel this would be too much trouble for us to fix on our side). |
Yes issue is now at I am glad this has been confirmed as a bug because it would have been really heavy work to try adapt and fix this. 😅 |
This is solved in Pandoc and test on Nighthly version is now passing. So it will resolve itself when new Pandoc version is out. |
Pandoc 3.1.12.2 has been released https://github.com/jgm/pandoc/releases/tag/3.1.12.2 |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Changed in 3.1.12 https://pandoc.org/releases.html#pandoc-3.1.12-2024-02-14
This makes some of our test to fails
We need to adapt, and check if this is a problem forbookdown. It is possible the numbering gets modified... 🤔
The text was updated successfully, but these errors were encountered: