diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-24 21:58:45 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-24 21:58:45 +0200 |
| commit | 7163b4a6c57c99fda085bf9b364c82bdba8ea698 (patch) | |
| tree | 935d953e3019b602e814e882bdedf6fe6b72dbda /src/library | |
| parent | 2f33ad0e0aa3d1f4a949025597bf1ea36256831f (diff) | |
Soft pagebreak
Diffstat (limited to 'src/library')
| -rw-r--r-- | src/library/layout/page.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/layout/page.rs b/src/library/layout/page.rs index 13583f09..38ba53e9 100644 --- a/src/library/layout/page.rs +++ b/src/library/layout/page.rs @@ -164,8 +164,9 @@ pub struct PagebreakNode; #[node] impl PagebreakNode { - fn construct(_: &mut Context, _: &mut Args) -> TypResult<Content> { - Ok(Content::Pagebreak) + fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + let soft = args.named("soft")?.unwrap_or(false); + Ok(Content::Pagebreak(soft)) } } |
