diff options
| author | John MacFarlane <[email protected]> | 2023-12-04 08:42:12 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-12-04 08:42:12 -0800 |
| commit | dbdb4d9c1f16f57f4c66a84ed71b7837aeb69208 (patch) | |
| tree | de3c1ae8cb46ff1351dbbc57606778fa881a6b02 /src | |
| parent | f8ba1280c66a10ccb0a9030de680d5abef1d62c4 (diff) | |
Typst writer: put inline image dimensions on enclosing box, not image.
Closes #9104.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs index 10948e2ab..fcdd037f2 100644 --- a/src/Text/Pandoc/Writers/Typst.hs +++ b/src/Text/Pandoc/Writers/Typst.hs @@ -285,10 +285,7 @@ inlineToTypst inline = opts <- gets stOptions let mbHeight = lookup "height" kvs let mdWidth = lookup "width" kvs - let coreImage = "image" <> - parens (doubleQuoted src <> - maybe mempty (\w -> ", width: " <> literal w) mdWidth <> - maybe mempty (\h -> ", height: " <> literal h) mbHeight) + let coreImage = "image" <> parens (doubleQuoted src) -- see #9104; we need a box or the image is treated as block-level: case (mdWidth, mbHeight) of (Nothing, Nothing) -> do |
