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
4 changes: 2 additions & 2 deletions src/resources/filters/quarto-pre/code-annotation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,10 @@ function code_annotations()
local dl
if _quarto.format.isAsciiDocOutput() then
local formatted = pandoc.List()
for _i,v in ipairs(items) do
for _,v in ipairs(items) do
local annotationMarker = v[1] .. ' '
local definition = v[2]
tprepend(definition.content, {annotationMarker})
tprepend(definition.content, {pandoc.RawInline('asciidoc', annotationMarker)})
formatted:insert(definition)
end
dl = pandoc.Div(formatted)
Expand Down
7 changes: 6 additions & 1 deletion tests/docs/smoke-all/2023/01/26/asciidoc-annotated-code.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ format:
asciidoc: default
_quarto:
tests:
asciidoc: default
asciidoc:
ensureFileRegexMatches:
- ['\<1\> First set', 'plt\.show\(\) \<3\>']
- ['\+\+\<\+\+1\+\+\>\+\+']
---

This also covers https://github.com/quarto-dev/quarto-cli/issues/12441

## Annotated Code

```python
Expand Down
Loading