mirror of
https://github.com/typst/typst
synced 2025-06-28 00:03:17 +08:00
Fix set document bug
This commit is contained in:
parent
8cbc2ac483
commit
2b26e08128
@ -433,9 +433,10 @@ impl<'a, 'v, 't> Builder<'a, 'v, 't> {
|
|||||||
if self.doc.is_none() {
|
if self.doc.is_none() {
|
||||||
bail!(span, "not allowed here");
|
bail!(span, "not allowed here");
|
||||||
}
|
}
|
||||||
if !self.flow.0.is_empty()
|
if styles.is_none()
|
||||||
|| !self.par.0.is_empty()
|
&& (!self.flow.0.is_empty()
|
||||||
|| !self.list.items.is_empty()
|
|| !self.par.0.is_empty()
|
||||||
|
|| !self.list.items.is_empty())
|
||||||
{
|
{
|
||||||
bail!(span, "must appear before any content");
|
bail!(span, "must appear before any content");
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 991 B |
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
// This is okay.
|
// This is okay.
|
||||||
// Ref: false
|
|
||||||
#set document(title: "Hello")
|
#set document(title: "Hello")
|
||||||
|
What's up?
|
||||||
|
|
||||||
---
|
---
|
||||||
Hello
|
Hello
|
||||||
|
Loading…
x
Reference in New Issue
Block a user