added "rmarkdown" engine to process code blocks #1683
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into a situation where I wanted to be able to turn on or off different pieces of commentary in the markdown throughout a document. For example, I would ideally like to set a flag to include more technical commentary for an analytic audience, but then strip them out for a general audience.
Although the
asis
engine works in most cases, it doesn't process inline code blocks that I often use for communicating results. To address this, I added a newrmarkdown
engine to pre-process the text usingknitr::knit
.Here is an example document where this is useful:
let me know if any tests should be added. I couldn't find any for the
asis
engine and figured this would only necessitate a similar level of testing.