Skip to content

Commit 51736db

Browse files
authored
Merge pull request #9975 from quarto-dev/bugfix/9972
lua,typst - fixes for unnumbered sections
2 parents a612731 + 54992b2 commit 51736db

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

news/changelog-1.5.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ All changes included in 1.5:
8686
- ([#9722](https://github.com/quarto-dev/quarto-cli/issues/9722)): Resolve data URI images in Typst.
8787
- ([#9555](https://github.com/quarto-dev/quarto-cli/issues/9555)): Text elements in Typst are internationalized.
8888
- ([#9887](https://github.com/quarto-dev/quarto-cli/issues/9887)): Use correct supplement for div floats in Typst.
89+
- ([#9972](https://github.com/quarto-dev/quarto-cli/issues/9972)): Fix crashes with unnumbered sections.
8990
- Upgrade Typst to 0.11
9091
- Upgrade the Typst template to draw tables without grid lines by default, in accordance with latest Pandoc.
9192

src/resources/filters/modules/typst.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ local function _main()
1313
result:insert(pandoc.RawInline("typst", tostring(v)))
1414
elseif type(v) == "string" then
1515
result:insert(pandoc.RawInline("typst", "\"" .. v .. "\""))
16+
elseif type(v) == "boolean" then
17+
result:insert(pandoc.RawInline("typst", v and "true" or "false"))
1618
elseif v.t == "RawInline" or v.t == "RawBlock" then
1719
if v.format == "typst" then
1820
result:insert(v)

src/resources/filters/quarto-post/typst.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function render_typst()
7575
{"level", el.level},
7676
})
7777
if el.classes:includes("unnumbered") then
78-
params:insert({"numbering", "none"})
78+
params:insert({"numbering", pandoc.RawInline("typst", "none")})
7979
end
8080
if el.classes:includes("unlisted") then
8181
params:insert({"outlined", false})
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: issue-9972
3+
format: typst
4+
---
5+
6+
# Section {.unlisted}
7+
8+
This is a simple placeholder for the manuscript's main document.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: issue-9972
3+
format: typst
4+
---
5+
6+
# Section {-}
7+
8+
This is a simple placeholder for the manuscript's main document.

0 commit comments

Comments
 (0)