diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-07 12:21:12 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-07 12:46:05 +0100 |
| commit | efd1853d069fbd1476e82d015da4d0d04cfaccc0 (patch) | |
| tree | 842b745c134306539d10c61be9485794fe8dc7dc /tests/typ/style/set.typ | |
| parent | eb951c008beea502042db4a3a0e8d1f8b51f6f52 (diff) | |
Show it!
- New show rule syntax
- Set if syntax
- Removed wrap syntax
Diffstat (limited to 'tests/typ/style/set.typ')
| -rw-r--r-- | tests/typ/style/set.typ | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/typ/style/set.typ b/tests/typ/style/set.typ index 25dc1b81..2864b81b 100644 --- a/tests/typ/style/set.typ +++ b/tests/typ/style/set.typ @@ -49,5 +49,18 @@ Hello *{x}* + Tiger --- +// Test conditional set. +#show ref: it => { + set text(red) if it.target == "unknown" + it +} + +@hello from the @unknown + +--- +// Error: 19-24 expected boolean, found integer +#set text(red) if 1 + 2 + +--- // Error: 11-25 set is only allowed directly in code and content blocks { let x = set text(blue) } |
