diff --git a/src/lib.typ b/src/lib.typ index 5496030..d752a4e 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -40,7 +40,13 @@ } #let url(label, content) = { - link(label)[#underline(offset: 2pt, stroke: 0.5pt + blue, text(fill: blue, content))] + link(label)[#underline(offset: 2pt, stroke: 0.5pt + blue, text(fill: blue)[ + #content + #let domain = label.find(regex("\w+\.\w+(?:\.\w+)*")) + #if domain.len() > 0 [ + (#domain) + ] + ])] } // start of template pages and styles diff --git a/template/main.typ b/template/main.typ index 2765dc8..9f4d232 100644 --- a/template/main.typ +++ b/template/main.typ @@ -68,7 +68,7 @@ $ lorem(200), ) -#url("https://github.com", "text (github.com)") +#url("https://github.com", "text") #lorem(50)