diff options
Diffstat (limited to 'src/library/structure.rs')
| -rw-r--r-- | src/library/structure.rs | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/library/structure.rs b/src/library/structure.rs index e6d242a0..2bcd2744 100644 --- a/src/library/structure.rs +++ b/src/library/structure.rs @@ -1,30 +1,36 @@ use crate::func::prelude::*; use Command::*; -/// 📜 `page.break`: Ends the current page. +/// ↩ `line.break`, `n`: Ends the current line. #[derive(Debug, PartialEq)] -pub struct Pagebreak; +pub struct Linebreak; function! { - data: Pagebreak, + data: Linebreak, parse: plain, - - layout(_, _) { - Ok(commands![FinishLayout]) - } + layout(_, _) { Ok(commands![FinishFlexRun]) } } -/// 🔙 `line.break`, `n`: Ends the current line. +/// ↕ `paragraph.break`: Ends the current paragraph. +/// +/// This has the same effect as two subsequent newlines. #[derive(Debug, PartialEq)] -pub struct Linebreak; +pub struct Parbreak; function! { - data: Linebreak, + data: Parbreak, parse: plain, + layout(_, _) { Ok(commands![FinishFlexLayout]) } +} - layout(_, _) { - Ok(commands![FinishFlexRun]) - } +/// 📜 `page.break`: Ends the current page. +#[derive(Debug, PartialEq)] +pub struct Pagebreak; + +function! { + data: Pagebreak, + parse: plain, + layout(_, _) { Ok(commands![FinishLayout]) } } /// 📐 `align`: Aligns content in different ways. |
