diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 20:23:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 20:25:24 +0100 |
| commit | 7b2cdb9d95331bba87f9ae54c71b7103a10faf1c (patch) | |
| tree | 8b0581fd14849e6a6ceaa9527ed8534e05d2b695 /tests/typ/compiler | |
| parent | 77c29b36d4e8706163c8d52359577e403a15a1ae (diff) | |
Require colon in show rule
Diffstat (limited to 'tests/typ/compiler')
| -rw-r--r-- | tests/typ/compiler/break-continue.typ | 2 | ||||
| -rw-r--r-- | tests/typ/compiler/show-bare.typ | 12 | ||||
| -rw-r--r-- | tests/typ/compiler/show-node.typ | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/typ/compiler/break-continue.typ b/tests/typ/compiler/break-continue.typ index e1041551..d4bd01e3 100644 --- a/tests/typ/compiler/break-continue.typ +++ b/tests/typ/compiler/break-continue.typ @@ -116,7 +116,7 @@ // Everything should be in smallcaps. #for color in (red, blue, green, yellow) [ #set text("Roboto") - #show it => text(fill: color, it) + #show: it => text(fill: color, it) #smallcaps(if color != green [ Some ] else [ diff --git a/tests/typ/compiler/show-bare.typ b/tests/typ/compiler/show-bare.typ index 2f076ade..0558fc44 100644 --- a/tests/typ/compiler/show-bare.typ +++ b/tests/typ/compiler/show-bare.typ @@ -9,25 +9,25 @@ T. Ypst ] -#show columns.with(2) +#show: columns.with(2) Great typography is at the essence of great storytelling. It is the medium that transports meaning from parchment to reader, the wave that sparks a flame in booklovers and the great fulfiller of human need. --- // Test bare show in content block. -A #[_B #show c => [*#c*]; C_] D +A #[_B #show: c => [*#c*]; C_] D --- // Test style precedence. #set text(fill: eastern, size: 1.5em) -#show text.with(fill: forest) +#show: text.with(fill: forest) Forest --- -#show [Shown] +#show: [Shown] Ignored --- -// Error: 5-19 show is only allowed directly in code and content blocks -#{ (show body => 2) * body } +// Error: 5-20 show is only allowed directly in code and content blocks +#{ (show: body => 2) * body } diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ index f6298a28..09481957 100644 --- a/tests/typ/compiler/show-node.typ +++ b/tests/typ/compiler/show-node.typ @@ -64,7 +64,7 @@ Another text. world { set text(blue) - show it => { + show: it => { show "o": "Ø" it } |
