New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing text (prose) not rendered for expression input #89
Comments
This looks like an issue with |
AFAICT this problem is specific to expression input and is because R's source references do not contain the trailing comment. As long as reprex uses Non-expression input: reprex(input = c("1:2", "#' Trailing text")) Result: 1:2
#> [1] 1 2 Trailing text Expression input: reprex(input = c("1:2", "#' Trailing text")) Result: 1:2
#> [1] 1 2 Expression input with a protective end-cap: reprex({
1:2
#' Trailing text
#+ echo = FALSE
invisible()
}) Result: 1:2
#> [1] 1 2 Trailing text |
Pretty sure it's not practical to address this. Trailing text is a reason to use the |
OK I am going to fix this. |
After the fix, with this input: reprex({
#' If a `reprex` ends with text, the text following the code is NOW rendered
x <- 1:2
#' Trailing text woot!
}) Output: If a x <- 1:2 Trailing text woot! |
If a
reprex
ends with text, the text following the code is not rendered. I.e. thisreprex
code:...generates this:
If a
reprex
ends with text, the text following the code is not renderedAdd some code after the trailing text to render it
Non-trailing text is rendered
The text was updated successfully, but these errors were encountered: