Skip to content

Commit

Permalink
Merge pull request #9678 from quarto-dev/bugfix/9675
Browse files Browse the repository at this point in the history
typst - fix regression with empty node contents
  • Loading branch information
cscheid authored May 15, 2024
2 parents c6986cc + 9abea71 commit fcfdc4c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resources/filters/layout/typst.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
-- Copyright (C) 2023 Posit Software, PBC

function make_typst_figure(tbl)
local content = tbl.content
local content = tbl.content or pandoc.Div({})
local caption_location = tbl.caption_location
local caption = tbl.caption
local caption = tbl.caption or pandoc.Div({})
local kind = tbl.kind
local supplement = tbl.supplement
local numbering = tbl.numbering
Expand Down
11 changes: 11 additions & 0 deletions tests/docs/smoke-all/2024/05/15/9675.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "No Caption Figure Test"
author: Jane Doe
format: typst
---

Text.

![](surus.jpg){#fig-xkcd}

Text.
Binary file added tests/docs/smoke-all/2024/05/15/surus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fcfdc4c

Please sign in to comment.