summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-08-04 11:46:04 +0200
committerLaurenz <laurmaedje@gmail.com>2020-08-04 11:46:04 +0200
commited4fdcb0ada909f1cc3d7436334e253f0ec14d55 (patch)
tree2b9abe7a852a060899ce4aa976391fa8dd9d293b /src/library
parentdbfb3d2ced91e56314dfabbb4df9a338926c0a7a (diff)
Par nodes 🧳
Diffstat (limited to 'src/library')
-rw-r--r--src/library/mod.rs1
-rw-r--r--src/library/page.rs9
-rw-r--r--src/library/spacing.rs20
3 files changed, 9 insertions, 21 deletions
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::<PageFunc>("page");
std.add::<AlignFunc>("align");
std.add::<BoxFunc>("box");
- std.add::<ParBreakFunc>("parbreak");
std.add::<PageBreakFunc>("pagebreak");
std.add_with_meta::<SpacingFunc>("h", Horizontal);
std.add_with_meta::<SpacingFunc>("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
@@ -3,26 +3,6 @@ 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)]
pub struct SpacingFunc {