summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs2
-rw-r--r--test/writer.typst3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index 906d4939d..587a5e777 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -268,7 +268,7 @@ inlineToTypst inline =
Just ('#', ident) -> "<" <> literal ident <> ">"
_ -> doubleQuoted src
return $ "#link" <> parens dest <>
- if render Nothing contents == src
+ if inlines == [Str src]
then mempty
else nowrap $ brackets contents
Image (_,_,kvs) _inlines (src,_tit) -> do
diff --git a/test/writer.typst b/test/writer.typst
index 77deb5e24..14658c489 100644
--- a/test/writer.typst
+++ b/test/writer.typst
@@ -737,8 +737,7 @@ Here’s an #link("/script?foo=1&bar=2")[inline link in pointy braces].
== Autolinks
<autolinks>
-With an ampersand:
-#link("http://example.com/?foo=1&bar=2")[http://example.com/?foo\=1&bar\=2]
+With an ampersand: #link("http://example.com/?foo=1&bar=2")
- In a list?
- #link("http://example.com/")