From efd1853d069fbd1476e82d015da4d0d04cfaccc0 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 7 Nov 2022 12:21:12 +0100 Subject: Show it! - New show rule syntax - Set if syntax - Removed wrap syntax --- tests/typ/code/break-continue.typ | 2 +- tests/typ/code/field.typ | 4 ++-- tests/typ/code/import.typ | 2 +- tests/typ/code/include.typ | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/typ/code') diff --git a/tests/typ/code/break-continue.typ b/tests/typ/code/break-continue.typ index 2415cb8f..fb3222fa 100644 --- a/tests/typ/code/break-continue.typ +++ b/tests/typ/code/break-continue.typ @@ -116,7 +116,7 @@ // Everything should be in smallcaps. #for color in (red, blue, green, yellow) [ #set text("Roboto") - #wrap body in text(fill: color, body) + #show it => text(fill: color, it) #smallcaps(if color != green [ Some ] else [ diff --git a/tests/typ/code/field.typ b/tests/typ/code/field.typ index b63a8768..abea87fb 100644 --- a/tests/typ/code/field.typ +++ b/tests/typ/code/field.typ @@ -14,7 +14,7 @@ --- // Test field on node. -#show node: list as { +#show list: node => { test(node.items.len(), 3) } @@ -32,7 +32,7 @@ --- // Error: 29-32 unknown field "fun" -#show node: heading as node.fun +#show heading: node => node.fun = A --- diff --git a/tests/typ/code/import.typ b/tests/typ/code/import.typ index b554d6e7..5291af39 100644 --- a/tests/typ/code/import.typ +++ b/tests/typ/code/import.typ @@ -1,4 +1,4 @@ -// Test import statements. +// Test module imports. --- // Test importing semantics. diff --git a/tests/typ/code/include.typ b/tests/typ/code/include.typ index cd3328a2..e862adac 100644 --- a/tests/typ/code/include.typ +++ b/tests/typ/code/include.typ @@ -1,4 +1,4 @@ -// Test include statements. +// Test module includes. --- #set page(width: 200pt) -- cgit v1.2.3