summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-25 14:08:30 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-26 14:51:57 +0200
commit1ca4ff69e235ca6dde9ef498a8377d0586f2519c (patch)
treeef7c8a1c1f18d5b2a3ed25b8355b8f84dc35a3fa /tests
parent5e34c81a0161d5f0649970fcb980d96ede24f853 (diff)
Trim `mailto:` and `tel:` from links
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/text/links.pngbin6727 -> 9284 bytes
-rw-r--r--tests/typ/text/links.typ4
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/ref/text/links.png b/tests/ref/text/links.png
index 2449880a..38abf0c5 100644
--- a/tests/ref/text/links.png
+++ b/tests/ref/text/links.png
Binary files differ
diff --git a/tests/typ/text/links.typ b/tests/typ/text/links.typ
index e6aa1d89..bea5f93e 100644
--- a/tests/typ/text/links.typ
+++ b/tests/typ/text/links.typ
@@ -7,6 +7,10 @@
// With line break.
This link appears #link("https://google.com/")[in the middle of] a paragraph.
+// Prefix is trimmed.
+Contact #link("mailto:hi@typst.app") or call #link("tel:123") for more information.
+
+---
// Styled with underline and color.
#let link(url, body) = link(url, font(fill: rgb("283663"), underline(body)))
You could also make the #link("https://html5zombo.com/")[link look way more typical.]