Skip to content

ask knitr to hold/coalesce echos when renderings is set#12402

Merged
gordonwoodhull merged 2 commits intomainfrom
bugfix/renderings-knitr-hold-echos
Mar 28, 2025
Merged

ask knitr to hold/coalesce echos when renderings is set#12402
gordonwoodhull merged 2 commits intomainfrom
bugfix/renderings-knitr-hold-echos

Conversation

@gordonwoodhull
Copy link
Copy Markdown
Member

@gordonwoodhull gordonwoodhull commented Mar 28, 2025

fixes #12362

As suggested by @cderv, add a hook to knitr to hold/coalesce echos when renderings is set, so that echos are not interspersed with plot outputs.

This makes knitr consistent with other engines, and allows all the code to be displayed with renderings: [light, dark].

@gordonwoodhull gordonwoodhull added this to the v1.7 milestone Mar 28, 2025
@gordonwoodhull gordonwoodhull requested a review from cderv March 28, 2025 14:10
@gordonwoodhull gordonwoodhull force-pushed the bugfix/renderings-knitr-hold-echos branch 2 times, most recently from 607eb10 to 41b0120 Compare March 28, 2025 14:23
Copy link
Copy Markdown
Member

@cderv cderv left a comment

Choose a reason for hiding this comment

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

Great that works !

Comment thread src/resources/rmd/hooks.R
@gordonwoodhull gordonwoodhull force-pushed the bugfix/renderings-knitr-hold-echos branch from 41b0120 to b73b83c Compare March 28, 2025 15:34
@gordonwoodhull gordonwoodhull merged commit a3cbf11 into main Mar 28, 2025
49 checks passed
@gordonwoodhull gordonwoodhull deleted the bugfix/renderings-knitr-hold-echos branch March 28, 2025 16:02
@gordonwoodhull
Copy link
Copy Markdown
Member Author

Thanks @cderv!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

renderings: light, dark needs to coalesce echo

2 participants