summaryrefslogtreecommitdiff
path: root/tests/typ/text
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-09-26 15:39:32 +0200
committerLaurenz <laurmaedje@gmail.com>2022-09-26 16:12:57 +0200
commit704f2fbaf1b4483caa12f249a222c49e44f08961 (patch)
tree146f7813fe63409df2c1bbaa487731e992d3ac71 /tests/typ/text
parent2661f1a5066bd5e3f8a9c68e4a5c304c248efcb7 (diff)
Description lists, link syntax, and new enum syntax
Diffstat (limited to 'tests/typ/text')
-rw-r--r--tests/typ/text/escape.typ7
-rw-r--r--tests/typ/text/justify.typ4
-rw-r--r--tests/typ/text/linebreak.typ6
-rw-r--r--tests/typ/text/link.typ13
-rw-r--r--tests/typ/text/par.typ2
5 files changed, 18 insertions, 14 deletions
diff --git a/tests/typ/text/escape.typ b/tests/typ/text/escape.typ
index ccaf78e9..95a8a027 100644
--- a/tests/typ/text/escape.typ
+++ b/tests/typ/text/escape.typ
@@ -2,15 +2,12 @@
---
// Escapable symbols.
-\\ \/ \[ \] \{ \} \# \* \_ \
-\= \~ \` \$ \" \' \< \> \@
+\\ \/ \[ \] \{ \} \# \* \_ \+ \= \~ \
+\` \$ \" \' \< \> \@ \( \) \A
// No need to escape.
( ) ;
-// Unescapable.
-\a \: \; \( \)
-
// Escaped comments.
\//
\/\* \*\/
diff --git a/tests/typ/text/justify.typ b/tests/typ/text/justify.typ
index aa0878d3..e61817a6 100644
--- a/tests/typ/text/justify.typ
+++ b/tests/typ/text/justify.typ
@@ -21,8 +21,8 @@ D
---
// Test forced justification with justified break.
-A B C \+
-D E F \+
+A B C #linebreak(justify: true)
+D E F #linebreak(justify: true)
---
// Test that justificating chinese text is at least a bit sensible.
diff --git a/tests/typ/text/linebreak.typ b/tests/typ/text/linebreak.typ
index 797e2f7c..d8449bcc 100644
--- a/tests/typ/text/linebreak.typ
+++ b/tests/typ/text/linebreak.typ
@@ -30,7 +30,7 @@ Trailing break \ \
---
// Test justified breaks.
#set par(justify: true)
-With a soft \+
-break you can force a break without #linebreak(justified: true)
-breaking justification. #linebreak(justified: false)
+With a soft #linebreak(justify: true)
+break you can force a break without #linebreak(justify: true)
+breaking justification. #linebreak(justify: false)
Nice!
diff --git a/tests/typ/text/link.typ b/tests/typ/text/link.typ
index 01c0b88d..99b380f0 100644
--- a/tests/typ/text/link.typ
+++ b/tests/typ/text/link.typ
@@ -1,8 +1,8 @@
// Test hyperlinking.
---
-// Link without body.
-#link("https://example.com/")
+// Link syntax.
+https://example.com/
// Link with body.
#link("https://typst.app/")[Some text text text]
@@ -10,11 +10,18 @@
// With line break.
This link appears #link("https://google.com/")[in the middle of] a paragraph.
-// Prefix is trimmed.
+// Certain prefixes are trimmed when using the `link` function.
Contact #link("mailto:hi@typst.app") or
call #link("tel:123") for more information.
---
+// Test that the period is trimmed.
+https://a.b.?q=%10#. \
+Wahttp://link \
+Nohttps:\//link \
+Nohttp\://comment
+
+---
// Styled with underline and color.
#set link(fill: rgb("283663"))
You could also make the
diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ
index 059653c5..3c465ca8 100644
--- a/tests/typ/text/par.typ
+++ b/tests/typ/text/par.typ
@@ -39,7 +39,7 @@ Hello
fn main() {}
```
-$[ x + y = z ]$
+$ x + y = z $
- List