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: 1 addition & 0 deletions news/changelog-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ All changes included in 1.8:
- ([#13085](https://github.com/quarto-dev/quarto-cli/pull/13085)): Avoid `kbd` shortcode crashes on unknown OS keys.
- ([#13164](https://github.com/quarto-dev/quarto-cli/pull/13164)): add `julia` to execute schema to allow autocomplete suggestions. (@mcanouil)
- ([#13121](https://github.com/quarto-dev/quarto-cli/issues/13121)): Allow `contents` shortcode to find inline elements.
- ([#13216](https://github.com/quarto-dev/quarto-cli/issues/13216)): Properly disable `downlit` (`code-link`) and enable `code-annotations` when non-R code blocks are present.


## Quarto Internals
Expand Down
9 changes: 8 additions & 1 deletion src/resources/rmd/rmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@
# within a code chunk
for (x in seq_along(chunkStarts)) {
start <- chunkStarts[x]
end <- chunkEnds[x]
# Ensure end is greater than start
end <- start
for (e in chunkEnds) {
if (e > start) {
end <- e
break
}
}
for (y in start:end) {
if (y > start && y < end) {
chunkMap[y] <- TRUE
Expand Down
24 changes: 24 additions & 0 deletions tests/docs/smoke-all/2025/08/14/issue13216.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "Issue 13216"
format: html
code-annotations: below
code-link: true
_quarto:
tests:
html:
ensureHtmlElements:
-
- "dl.code-annotation-container-grid"
---

`downlit` (`code-link`) should be disable and `code-annotations` should be enabled.

```
hello
```

```{r}
2 + 2 # <1>
```

1. This is an annotation that should be properly displayed based on `code-annotations` setting.
Loading