Files
pandoc/test/command/typst-hs-80.md
John MacFarlane b69e9dbb81 Typst reader: handle document metadata and #title.
See jgm/typst-hs#80.

Note that previously, the typst reader never returned document
metadata.  Now it does, even if the typst document does not contain
a `#title` function that would result in actually printing the
title block.
2025-10-30 20:02:28 +01:00

56 lines
746 B
Markdown

```
% pandoc -f typst -t native -s
#set document(
title: [My Title],
)
#title()
^D
Pandoc
Meta
{ unMeta =
fromList
[ ( "title"
, MetaInlines [ Str "My" , Space , Str "Title" ]
)
]
}
[]
```
```
% pandoc -f typst -t native -s
#set document(
title: [ignored],
)
#title[My Title]
^D
Pandoc
Meta
{ unMeta =
fromList
[ ( "title"
, MetaInlines [ Str "My" , Space , Str "Title" ]
)
]
}
[]
```
```
% pandoc -f typst -t native -s
#title[My Title]
^D
Pandoc
Meta
{ unMeta =
fromList
[ ( "title"
, MetaInlines [ Str "My" , Space , Str "Title" ]
)
]
}
[]
```