Skip to content

Commit 471d69a

Browse files
committed
completion: propagate font through imported show transform
1 parent 7f28501 commit 471d69a

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/// path: ori.typ
2+
#let with(font: none) = it => {
3+
set text(font: font.main)
4+
it
5+
}
6+
7+
-----
8+
/// contains: "New Computer Modern"
9+
#import "ori.typ"
10+
11+
#let fonts = (
12+
main: ""/* range -1..0 */,
13+
cjk: "Noto Serif CJK SC"
14+
)
15+
16+
#show: ori.with(font: fonts)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
source: crates/tinymist-query/src/completion.rs
3+
assertion_line: 196
4+
description: "Completion on \" (79..80)"
5+
expression: "JsonRepr::new_pure(results)"
6+
input_file: crates/tinymist-query/src/fixtures/completion/font_through_imported_with.typ
7+
---
8+
[
9+
{
10+
"isIncomplete": false,
11+
"items": [
12+
{
13+
"kind": 6,
14+
"label": "\"New Computer Modern\"",
15+
"sortText": "003",
16+
"textEdit": {
17+
"newText": "New Computer Modern",
18+
"range": {
19+
"end": {
20+
"character": 9,
21+
"line": 4
22+
},
23+
"start": {
24+
"character": 9,
25+
"line": 4
26+
}
27+
}
28+
}
29+
}
30+
]
31+
}
32+
]

0 commit comments

Comments
 (0)