-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
do not wrap HTML as it was done by default before Pandoc 2.17 #1305
Conversation
as this breaks our parsing process for section references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks for the quick review. I have just added a test so that we can detect some issue in the future. More tests like this would be required IMO. It would be great to detect Pandoc's breakage earlier. 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we definitely need more tests.
R/ebook.R
Outdated
c(pandoc_args, '--section-divs', '--mathjax', '--number-sections', | ||
if (rmarkdown::pandoc_available("2.17")) c('--wrap', 'none')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c(pandoc_args, '--section-divs', '--mathjax', '--number-sections', | |
if (rmarkdown::pandoc_available("2.17")) c('--wrap', 'none')) | |
c(pandoc_args2(pandoc_args), '--section-divs', '--mathjax', '--number-sections') | |
) |
This also work it seems. Is it better as we already use --wrap
elsewhere ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the change
and fix issue in helper
instead of specific case for Pandoc 2.17
And tests were failing 😞 ... Snapshot test are really useful with markdown output as we can see clearly how it looks. However, maintaining several pandoc version is painful as the output will heavily change depending on the default behavior. So I went back to regex matching. I also use Does it seems better now ? |
[skip ci]
I think it is. I am merging. |
as this breaks our parsing process for section references.
This fixes #1301
THis PR is for now limited to the related issue but there are maybe other processing affected.