From ed4fdcb0ada909f1cc3d7436334e253f0ec14d55 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 4 Aug 2020 11:46:04 +0200 Subject: =?UTF-8?q?Par=20nodes=20=F0=9F=A7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/library/mod.rs | 1 - src/library/page.rs | 9 +++++++++ src/library/spacing.rs | 20 -------------------- 3 files changed, 9 insertions(+), 21 deletions(-) (limited to 'src/library') diff --git a/src/library/mod.rs b/src/library/mod.rs index 0f61b901..3b09a768 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -22,7 +22,6 @@ pub fn std() -> Scope { std.add::("page"); std.add::("align"); std.add::("box"); - std.add::("parbreak"); std.add::("pagebreak"); std.add_with_meta::("h", Horizontal); std.add_with_meta::("v", Vertical); diff --git a/src/library/page.rs b/src/library/page.rs index 1cc76d7f..b13f8a1e 100644 --- a/src/library/page.rs +++ b/src/library/page.rs @@ -57,3 +57,12 @@ function! { vec![SetPageStyle(style)] } } + +function! { + /// `pagebreak`: Ends the current page. + #[derive(Debug, Default, Clone, PartialEq)] + pub struct PageBreakFunc; + + parse(default) + layout(self, ctx, f) { vec![BreakPage] } +} diff --git a/src/library/spacing.rs b/src/library/spacing.rs index 545f3910..6503556f 100644 --- a/src/library/spacing.rs +++ b/src/library/spacing.rs @@ -2,26 +2,6 @@ use crate::layout::SpacingKind; use crate::length::ScaleLength; use super::*; -function! { - /// `parbreak`: Ends the current paragraph. - /// - /// This has the same effect as two subsequent newlines. - #[derive(Debug, Default, Clone, PartialEq)] - pub struct ParBreakFunc; - - parse(default) - layout(self, ctx, f) { vec![BreakParagraph] } -} - -function! { - /// `pagebreak`: Ends the current page. - #[derive(Debug, Default, Clone, PartialEq)] - pub struct PageBreakFunc; - - parse(default) - layout(self, ctx, f) { vec![BreakPage] } -} - function! { /// `h` and `v`: Add horizontal or vertical spacing. #[derive(Debug, Clone, PartialEq)] -- cgit v1.2.3