diff options
| author | John MacFarlane <[email protected]> | 2025-10-30 20:02:28 +0100 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-10-30 20:02:28 +0100 |
| commit | b69e9dbb810573d5f039233f8e84ee3acb2027fe (patch) | |
| tree | 89f7de607700bf3e09151ce10103777c32f0e256 /test | |
| parent | 2c6cd8327aaaaa64f4a5fd340d6805ec625de8d6 (diff) | |
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/command/typst-hs-80.md | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/command/typst-hs-80.md b/test/command/typst-hs-80.md new file mode 100644 index 000000000..ed0e9228c --- /dev/null +++ b/test/command/typst-hs-80.md @@ -0,0 +1,55 @@ +``` +% 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" ] + ) + ] + } + [] +``` |
