-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix interactions of dynamic code and fragile tags
Before this, we evaluated dynamic after the fragile tags were removed (set aside temporarily). This is problematic, because these tags were also removed from within inline code and code blocks, and more importantly, you could not reliably return fragile tags from the dynamic code. After this patch the order is this: 1. Parse the tag as markdown, find the inline code and the code blocks, execute them, substitute back the result. 2. Set aside the fragile tags, temporarily. 3. Parse as markdown again, generate Rd. 4. Put back the fragile tags. This is a breaking change in theory, however dynamic code is relatively recent, and the affected documentation is somewhat obscure, so we can probably get away with it. The potentially affected cases are: * People having dynamic code in fragile tags. E.g. #' blah \out{`r expression`} blah This will now evaluate the expression. * People generating fragile tags dynamically. E.g. as in the original post of #1115 We actually improve this use case with this patch. Closes #1115.
- Loading branch information
1 parent
d148c84
commit c72632c
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters