We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a66c94 commit e096e06Copy full SHA for e096e06
src/Text/Pandoc/Writers/Typst.hs
@@ -450,7 +450,11 @@ mkImage useBox src kvs
450
Just v -> ", " <> literal k <> ": " <> literal v
451
Nothing -> mempty
452
dimAttrs = mconcat $ map toDimAttr ["height", "width"]
453
- coreImage = "image" <> parens (doubleQuoted src' <> dimAttrs)
+ isData = "data:" `T.isPrefixOf` src'
454
+ dataSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><image xlink:href=\"" <> src' <> "\" /></svg>"
455
+ coreImage
456
+ | isData = "image.decode" <> parens(doubleQuoted dataSvg <> dimAttrs)
457
+ | otherwise = "image" <> parens (doubleQuoted src' <> dimAttrs)
458
459
textstyle :: PandocMonad m => Doc Text -> [Inline] -> TW m (Doc Text)
460
textstyle s inlines =
0 commit comments