Skip to content

Commit

Permalink
use language name 'md' for syntax highlighting .Rmd/.qmd
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Nov 6, 2024
1 parent 009b179 commit 1d50173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fuse.R
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,8 @@ add_fences = function(out, x, fence) {

# attributes for code blocks with line numbers
lineno_attr = function(lang = NA, start = 1, auto = TRUE) c(
if (!is.na(lang)) paste0('.', tolower(lang)), '.line-numbers',
if (auto) '.auto-numbers', sprintf('data-start="%d"', start)
if (!is.na(lang)) paste0('.', sub('^[rq]md$', 'md', tolower(lang))),
'.line-numbers', if (auto) '.auto-numbers', sprintf('data-start="%d"', start)
)

new_source = function(x) xfun::new_record(x, 'source')
Expand Down

0 comments on commit 1d50173

Please sign in to comment.