mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix the show rule effect for bibliography heading level (#4622)
This commit is contained in:
parent
d06a26e3d8
commit
1f81281118
@ -217,7 +217,7 @@ impl Show for Packed<BibliographyElem> {
|
||||
}) {
|
||||
seq.push(
|
||||
HeadingElem::new(title)
|
||||
.with_level(Smart::Custom(NonZeroUsize::ONE))
|
||||
.with_depth(NonZeroUsize::ONE)
|
||||
.pack()
|
||||
.spanned(self.span()),
|
||||
);
|
||||
|
BIN
tests/ref/issue-4618-bibliography-set-heading-level.png
Normal file
BIN
tests/ref/issue-4618-bibliography-set-heading-level.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
@ -53,3 +53,16 @@ Now we have multiple bibliographies containing @glacier-melt @keshav2007read
|
||||
|
||||
@Zee04
|
||||
#bibliography("/assets/bib/works_too.bib", style: "mla")
|
||||
|
||||
--- issue-4618-bibliography-set-heading-level ---
|
||||
// Test that the bibliography block's heading is set to 2 by the show rule,
|
||||
// and therefore should be rendered like a level-2 heading. Notably, this
|
||||
// bibliography heading should not be underlined.
|
||||
#show heading.where(level: 1): it => [ #underline(it.body) ]
|
||||
#show bibliography: set heading(level: 2)
|
||||
|
||||
= Level 1
|
||||
== Level 2
|
||||
@Zee04
|
||||
|
||||
#bibliography("/assets/bib/works_too.bib")
|
||||
|
Loading…
x
Reference in New Issue
Block a user