summaryrefslogtreecommitdiff
path: root/src/library/par.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/par.rs')
-rw-r--r--src/library/par.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/library/par.rs b/src/library/par.rs
deleted file mode 100644
index 1737133b..00000000
--- a/src/library/par.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-use super::*;
-
-/// `par`: Configure paragraphs.
-///
-/// # Named parameters
-/// - Paragraph spacing: `spacing`, of type `linear` relative to current font size.
-/// - Line leading: `leading`, of type `linear` relative to current font size.
-/// - Word spacing: `word-spacing`, of type `linear` relative to current font size.
-///
-/// # Return value
-/// A template that configures paragraph properties.
-pub fn par(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
- let spacing = args.named(ctx, "spacing");
- let leading = args.named(ctx, "leading");
- let word_spacing = args.named(ctx, "word-spacing");
-
- Value::template("par", move |ctx| {
- if let Some(spacing) = spacing {
- ctx.state.par.spacing = spacing;
- }
-
- if let Some(leading) = leading {
- ctx.state.par.leading = leading;
- }
-
- if let Some(word_spacing) = word_spacing {
- ctx.state.par.word_spacing = word_spacing;
- }
-
- ctx.parbreak();
- })
-}