diff options
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 10 | ||||
| -rw-r--r-- | test/command/9236.md | 9 | ||||
| -rw-r--r-- | test/writer.typst | 3 |
3 files changed, 5 insertions, 17 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs index 09bc65e8c..7d061ed05 100644 --- a/src/Text/Pandoc/Writers/Typst.hs +++ b/src/Text/Pandoc/Writers/Typst.hs @@ -200,17 +200,9 @@ blockToTypst block = -> pure $ mkImage False src kvs _ -> brackets <$> blocksToTypst blocks let lab = toLabel FreestandingLabel ident - let kind = case blocks of - Table{}:_ -> "kind: table" - CodeBlock{}:_ -> "kind: code" - Para [Image{}]:_ -> "kind: image" - Plain [Image{}]:_ -> "kind: image" - _ -> mempty return $ "#figure(" <> nest 2 ((contents <> ",") $$ - ("caption: [" $$ nest 2 caption $$ "],") - $$ - kind + ("caption: [" $$ nest 2 caption $$ "]") ) $$ ")" $$ lab $$ blankline Div (ident,_,_) (Header lev ("",cls,kvs) ils:rest) -> diff --git a/test/command/9236.md b/test/command/9236.md index 4fa36744b..f8eca5fb5 100644 --- a/test/command/9236.md +++ b/test/command/9236.md @@ -12,22 +12,19 @@ And inline: {height=2in} and #figure(image("command/minimal.svg", width: 3in), caption: [ minimal - ], - kind: image + ] ) #figure(image("command/minimal.svg", height: 2in, width: 3in), caption: [ minimal - ], - kind: image + ] ) #figure(image("command/minimal.svg"), caption: [ minimal - ], - kind: image + ] ) And inline: #box(image("command/minimal.svg", height: 2in)) and diff --git a/test/writer.typst b/test/writer.typst index aa474c823..e24de9a8a 100644 --- a/test/writer.typst +++ b/test/writer.typst @@ -787,8 +787,7 @@ From "Voyage dans la Lune" by Georges Melies (1902): #figure(image("lalune.jpg"), caption: [ lalune - ], - kind: image + ] ) Here is a movie #box(image("movie.jpg")) icon. |
