Skip to content
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

Merged
merged 5 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

## BUG FIXES

- Fix an issue with Pandoc 2.15 and footnote relocation in each chapter (#1275).

- Fix an issue with Pandoc 2.17 and internationalization of Proof-like environment (#1302).

- Fix an issue with Pandoc 2.17 and cross referencing sections in non HTML format (thanks, @N0rbert, #7862).

- Fix an issue with Pandoc 2.15 and footnote relocation in each chapter (#1275).

- Fix an issue with `html_book()` and `toc.css` not working correctly with recent pandoc (thanks, @florisvdh, #1268).

# CHANGES IN bookdown VERSION 0.24
Expand Down
3 changes: 2 additions & 1 deletion R/ebook.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ process_markdown = function(
on.exit(file.remove(intermediate_html), add = TRUE)
rmarkdown::pandoc_convert(
input_file, 'html', from, intermediate_html, TRUE,
c(pandoc_args, '--section-divs', '--mathjax', '--number-sections')
c(pandoc_args, '--section-divs', '--mathjax', '--number-sections',
if (rmarkdown::pandoc_available("2.17")) c('--wrap', 'none'))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
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 ?

Copy link
Collaborator Author

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

)
x = read_utf8(intermediate_html)
x = clean_html_tags(x)
Expand Down