Skip to content

Commit d6278ee

Browse files
upgrade fontawesome, fix some typst
some deprecation warnings. i am less sure about the s/amount/abs change but was getting the error error: length does not contain field amount ┌─ docs/smoke-all/typst/callout.typ:38:32 │ 38 │ fields.below = fields.below.amount │ ^^^^^^ can't find any documentation of amount so i'm hoping abs was meant here
1 parent 97a1d3d commit d6278ee

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/resources/filters/customnodes/callout.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function _callout_main()
224224
return
225225
end
226226
included_font_awesome = true
227-
quarto.doc.include_text("in-header", "#import \"@preview/fontawesome:0.1.0\": *")
227+
quarto.doc.include_text("in-header", "#import \"@preview/fontawesome:0.5.0\": *")
228228
end
229229

230230
_quarto.ast.add_renderer("Callout", function(_)

src/resources/formats/typst/pandoc/quarto/definitions.typ

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@
3535
if fields.at("below", default: none) != none {
3636
// TODO: this is a hack because below is a "synthesized element"
3737
// according to the experts in the typst discord...
38-
fields.below = fields.below.amount
38+
fields.below = fields.below.abs
3939
}
4040
return block.with(..fields)(new_content)
4141
}
4242

4343
#let empty(v) = {
44-
if type(v) == "string" {
44+
if type(v) == str {
4545
// two dollar signs here because we're technically inside
4646
// a Pandoc template :grimace:
4747
v.matches(regex("^\\s*$$")).at(0, default: none) != none
48-
} else if type(v) == "content" {
48+
} else if type(v) == content {
4949
if v.at("text", default: none) != none {
5050
return empty(v.text)
5151
}
@@ -108,7 +108,7 @@
108108
// callout rendering
109109
// this is a figure show rule because callouts are crossreferenceable
110110
#show figure: it => {
111-
if type(it.kind) != "string" {
111+
if type(it.kind) != str {
112112
return it
113113
}
114114
let kind_match = it.kind.matches(regex("^quarto-callout-(.*)")).at(0, default: none)

0 commit comments

Comments
 (0)