Skip to content

Commit

Permalink
fix: use argument name "style"
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Oct 14, 2024
1 parent 3dc7c35 commit c26f042
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils.typ
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@
///
/// - `setting` is the setting of the heading. Default is `body => body`.
///
/// - `display-heading` is the style of the heading. If `display-heading` is a function, it will use the function to style the heading.
/// For example, `display-heading: current-heading => current-heading.body`.
/// - `style` is the style of the heading. If `style` is a function, it will use the function to style the heading.
/// For example, `style: current-heading => current-heading.body`.
#let display-current-heading(
self: none,
level: auto,
hierachical: true,
depth: 9999,
display-heading: (setting: body => body, numbered: false, current-heading) => setting({
style: (setting: body => body, numbered: false, current-heading) => setting({
if numbered and current-heading.numbering != none {
_typst-builtin-numbering(
current-heading.numbering,
Expand All @@ -341,10 +341,10 @@
context {
let current-heading = current-heading(level: level, hierachical: hierachical, depth: depth)
if current-heading != none {
if display-heading == none {
if style == none {
current-heading
} else {
display-heading(..setting-args, current-heading)
style(..setting-args, current-heading)
}
}
}
Expand Down

0 comments on commit c26f042

Please sign in to comment.