Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* `` `Rd expr` `` inline code now generates `\Sexpr[stage=render,results=rd]{expr}`, providing a convenient syntax for evaluating R code at documentation render time (#1214).
* Indented bullet lists in `@param` and other two-part tags are no longer incorrectly nested (#1102).
* Horizontal rules (e.g. `----`) now generate a clear warning instead of an internal error about an unknown `thematic_break` xml node (#1707).
* Inline code with uppercase `` `R ` `` now warns that you should use lowercase `` `r ` `` instead, since knitr only supports lowercase.
* Inline R code (`` `r expr` ``) in non-indented list continuation lines no longer causes an error (#1651).
* Link text now supports non-code markup like bold and italic, e.g., `[*italic text*][func]` generates `\link[=func]{\emph{italic text}}`, matching R's support for markup in `\link` text in R 4.5.0.
* Links now do a better job of resolving package names: the process is cached for better performance (#1724); it works with infix operators (e.g. `[%in%]`) (#1728); no longer changes the link text (#1662); and includes base packages when reporting ambiguous functions (#1725). Links to external packages now use the topic alias instead of the Rd file name as the anchor. This fixes "Non-topic package-anchored link(s)" notes from R CMD check (#1709).
Expand Down
4 changes: 0 additions & 4 deletions R/markdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@ mdxml_break <- function(state) {
mdxml_code <- function(xml, tag) {
code <- xml_text(xml)

if (grepl("^R ", code)) {
warn_roxy_tag(tag$tag, "use ` r`, not `R `, for inline code")
}

if (grepl("^Rd ", code)) {
paste0(
"\\Sexpr[stage=render,results=rd]{",
Expand Down
7 changes: 0 additions & 7 deletions tests/testthat/_snaps/markdown-code.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# uppercase R in inline code gives warning

Code
. <- roc_proc_text(rd_roclet(), text)
Message
x <text>:2: @title use ` r`, not `R `, for inline code.

# multi-line inline code gives useful warning

Code
Expand Down
9 changes: 0 additions & 9 deletions tests/testthat/test-markdown-code.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ test_that("can eval inline code", {
expect_equal(out1$get_value("description"), "Description 4")
})

test_that("uppercase R in inline code gives warning", {
text <- "
#' @title Title `R 1 + 1`
#' @md
foo <- function() NULL
"
expect_snapshot(. <- roc_proc_text(rd_roclet(), text))
})

test_that("can eval fenced code", {
out1 <- roc_proc_text(
rd_roclet(),
Expand Down
Loading