Skip to content

Commit 1a8c1af

Browse files
authored
Merge pull request #7693 from quarto-dev/fix/typst-code
2 parents 7fe97be + c334bd3 commit 1a8c1af

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/resources/formats/typst/pandoc/quarto/definitions.typ

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323

2424
// Some quarto-specific definitions.
2525

26-
#show raw: it => {
27-
if it.block {
28-
block(fill: luma(230), width: 100%, inset: 8pt, radius: 2pt, it)
29-
} else {
30-
it
31-
}
32-
}
26+
#show raw.where(block: true): block.with(
27+
fill: luma(230),
28+
width: 100%,
29+
inset: 8pt,
30+
radius: 2pt
31+
)
3332

3433
#let block_with_new_content(old_block, new_content) = {
3534
let d = (:)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
format: typst
3+
---
4+
5+
This is an inline code `x + 1`
6+
7+
And this is a code block
8+
9+
```
10+
1 + 1
11+
```
12+
13+
Now with lang attributes
14+
```r
15+
1 + 1
16+
```
17+
18+
also inline `<div>`{.html}
19+
20+
This is also suppose to work `#raw("x + y")`{=typst}

0 commit comments

Comments
 (0)