mirror of https://github.com/stelzo/typst.git
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() {
|
||||
bail!(span, "not allowed here");
|
||||
}
|
||||
if !self.flow.0.is_empty()
|
||||
|| !self.par.0.is_empty()
|
||||
|| !self.list.items.is_empty()
|
||||
if styles.is_none()
|
||||
&& (!self.flow.0.is_empty()
|
||||
|| !self.par.0.is_empty()
|
||||
|| !self.list.items.is_empty())
|
||||
{
|
||||
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.
|
||||
// Ref: false
|
||||
#set document(title: "Hello")
|
||||
What's up?
|
||||
|
||||
---
|
||||
Hello
|
||||
|
|
|
|||
Loading…
Reference in New Issue