-
Notifications
You must be signed in to change notification settings - Fork 70
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
Disable urls during Rmarkdown::render()
in RStudio?
#581
Comments
Since the same output goes to both places we can either have no links anywhere, or maybe we can add links support to the issues panel, or at least make the issue panel drop ANSI sequences? |
I think no links might be the safer choice. |
Glad this is on the radar! yihui/knitr#2234 (comment) |
@mikeroswell beat me to it while I was writing this message. Here it is anyway We have an occurence of this in yihui/knitr#2234 with dplyr deprecation warnings as lifecycle is using urls now in the deprecation message For HTML outputs, it just show undesired character in the message, but for PDF, it prevents rendering because of those unknown special characters still present. |
Looking at the issue from knitr, that might be actually be a different problem? Because there the escapes are appearing in the document. |
I think they should be the same, the R process that runs knitr runs "in the render pane", so hyperlinks were turned on. Now they are off. |
I thought we used different heuristics inside an Rmd, but maybe I'm imagining that? |
We are doing that for colors, yeah. Probably the simplest is that if there are no colors, then we also turn off the hyperlinks. |
Any news on a fix for this? Compile (R/Rmarkdown) document to PDF currently won't run because of the unicode characters. |
It is already fixed. If you still have issues, make sure you use cli from this repository. You can also turn off links by setting the |
Could you guide me on installing the package from GitHub? I've tried using the devtools and remotes package, but they fail as cli is already in ise |
Try this: install.packages("pak", repos = sprintf(
"https://r-lib.github.io/p/pak/stable/%s/%s/%s",
.Platform$pkgType,
R.Version()$os,
R.Version()$arch
))
pak::pkg_install("r-lib/cli") |
Just to add more color, the change motivated by this seems to have also fixed a problem in |
* Fix docs: remove duplicated item * Fix typos * Fix another typo * Fix typo * Add UTF-8 snapshot output For a tests with utf-8/ascii variants. * document() * Update GHA * New keypress() function (r-lib#540) * New `hash_file_md5()` function, MD5 hash of files * No show-cursor ANSI seq in task cb & finalizer if env var If `R_CLI_HIDE_CURSOR` is set to `false` then cli does not register a task callback and a finalizer to show the cursor. This is to make the output more predictable in test cases. * Compatibility with webR * Support hidden visibility * README in light/dark mode (r-lib#546) * add prettyunits to `Config/Needs/website` (r-lib#549) Closes r-lib#548 * Polish NEWS [ci skip] * Fix URL redirect [ci skip] * Increment version number to 3.5.0 * Increment version number to 3.5.0.9000 * Fix doc (r-lib#552) * hash_*sha1() functions to calculate SHA-1 hashes (r-lib#551) * Set empty param-lists to `void` in exported `progress.h` file (r-lib#553) * The progressr progress handler now reports progress correctly Closes r-lib#558. * Refine progress bar condition Show after `getOption("cli.progress_show_after", 2)/2` if we are less than half way. Closes r-lib#542. * format_inline() now keeps newline charaters * New `keep_newlines = TRUE` argument to `format_inline()` It does not break any tests, but we might need to change the default to `FALSE` if it breaks reverse dependencies. * Add test cases for `format_inline(..., keep_newlines)` * Add more (void) args to pacify CRAN's compilers * `format_inline()` now keeps all whitespace as is by default And has a new argument: `keep_whitespace` to choose the old behavior. * Increment version number to 3.6.0 * Increment version number to 3.6.0.9000 * Fix ASAN warnings Closes r-lib#565. * Fix/tweak documentation * Update errors.R from processx * Manual: link to [inline-markup] where appropriate Closes r-lib#585. * Fix hyperlink support detection in RStudio The RSTUDIO_CLI_HYPERLINKS env var should only be used if we are in a pane with hyperlink support. * Turn off hyperlinks in the RStudio render pane Closes r-lib#581. * Remove test case that is not needed any more * Turn off ANSI hyperlinks if we don't have ANSI colors If we don't have colors, then we probably don't have hyperlink support, either. * Fix test cases for hyperlink detection changes * Update NEWS * Fix snapshots * Increment version number to 3.6.1 * 'lengths' instead of 'length' * Document `str` in the class list * Mention `encodeString()` * Increment version number to 3.6.1.9000 * Fix pkgdown build on CI * Fix typo in "directory" * Tyoi * Add R-hub v2 workflow file [ci skip] * Fixed typo * Fix minor typo in hash_raw_animal docs * Fixed typo in hash_animal() docs * Update hash.R Fixed typo in hash_sha1() docs * Fixed a few typos in hash_md5() docs * Replaced between to remove ambiguitity about whether range is inclusive * Update hash.R Fixed minor typo in hash_sha256() docs * Add missing c() in cli_abort() * Move scripts to /exec * Fix URLs in news.R script * Fix typo * Redocument * Change semantics of cli.default_num_colors option So that it is possible to use it even if color support is not detected, but at least it is not ruled out by some other options and detections. * Document [ci skip] * Docs typo [ci skip] * DS-5106: Rerun GitHub Action * Trigger tests --------- Co-authored-by: David C Hall <[email protected]> Co-authored-by: Gábor Csárdi <[email protected]> Co-authored-by: Salim B <[email protected]> Co-authored-by: George Stagg <[email protected]> Co-authored-by: Lionel Henry <[email protected]> Co-authored-by: Simon P. Couch <[email protected]> Co-authored-by: Jenny Bryan <[email protected]> Co-authored-by: DavisVaughan <[email protected]> Co-authored-by: James Baird <[email protected]> Co-authored-by: olivroy <[email protected]> Co-authored-by: Shian Su <[email protected]> Co-authored-by: Justin Mills <[email protected]> Co-authored-by: we <[email protected]> Co-authored-by: jrwishart <[email protected]>
e.g. create an
.Rmd
containing this code and render it with cmd + shift + KThe issues panes doesn't support ANSI formatting:
OTOH the output pane does:
The text was updated successfully, but these errors were encountered: