mirror of
https://github.com/typst/typst
synced 2025-07-11 22:52:53 +08:00
24 lines
658 B
Typst
24 lines
658 B
Typst
// Test the `upper` and `lower` functions.
|
|
|
|
--- lower-and-upper ---
|
|
#let memes = "ArE mEmEs gReAt?";
|
|
#test(lower(memes), "are memes great?")
|
|
#test(upper(memes), "ARE MEMES GREAT?")
|
|
#test(upper("Ελλάδα"), "ΕΛΛΆΔΑ")
|
|
|
|
--- cases-content-text ---
|
|
// Check that cases are applied to text nested in content
|
|
#lower(box("HI!"))
|
|
|
|
--- cases-content-symbol ---
|
|
// Check that cases are applied to symbols nested in content
|
|
#lower($H I !$.body)
|
|
|
|
--- cases-content-html html ---
|
|
#lower[MY #html.strong[Lower] #symbol("A")] \
|
|
#upper[my #html.strong[Upper] #symbol("a")] \
|
|
|
|
--- upper-bad-type ---
|
|
// Error: 8-9 expected string or content, found integer
|
|
#upper(1)
|