diff options
Diffstat (limited to 'src/library/text')
| -rw-r--r-- | src/library/text/deco.rs | 2 | ||||
| -rw-r--r-- | src/library/text/link.rs | 2 | ||||
| -rw-r--r-- | src/library/text/mod.rs | 12 | ||||
| -rw-r--r-- | src/library/text/par.rs | 6 | ||||
| -rw-r--r-- | src/library/text/raw.rs | 2 | ||||
| -rw-r--r-- | src/library/text/repeat.rs | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/library/text/deco.rs b/src/library/text/deco.rs index dedaa6e8..cec4ca9e 100644 --- a/src/library/text/deco.rs +++ b/src/library/text/deco.rs @@ -35,7 +35,7 @@ impl<const L: DecoLine> DecoNode<L> { /// with the glyphs. Does not apply to strikethrough. pub const EVADE: bool = true; - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { Ok(Content::show(Self(args.expect("body")?))) } } diff --git a/src/library/text/link.rs b/src/library/text/link.rs index 284f0b1f..728b594f 100644 --- a/src/library/text/link.rs +++ b/src/library/text/link.rs @@ -19,7 +19,7 @@ impl LinkNode { /// Whether to underline link. pub const UNDERLINE: bool = true; - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { Ok(Content::show(Self { url: args.expect::<EcoString>("url")?, body: args.eat()?, diff --git a/src/library/text/mod.rs b/src/library/text/mod.rs index 1b83b0f4..bbe397ca 100644 --- a/src/library/text/mod.rs +++ b/src/library/text/mod.rs @@ -127,7 +127,7 @@ impl TextNode { #[property(skip, fold)] pub const DECO: Decoration = vec![]; - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { // The text constructor is special: It doesn't create a text node. // Instead, it leaves the passed argument structurally unchanged, but // styles all text in it. @@ -443,12 +443,12 @@ impl Fold for Vec<(Tag, u32)> { } /// Convert text to lowercase. -pub fn lower(_: &mut Context, args: &mut Args) -> TypResult<Value> { +pub fn lower(_: &mut Machine, args: &mut Args) -> TypResult<Value> { case(Case::Lower, args) } /// Convert text to uppercase. -pub fn upper(_: &mut Context, args: &mut Args) -> TypResult<Value> { +pub fn upper(_: &mut Machine, args: &mut Args) -> TypResult<Value> { case(Case::Upper, args) } @@ -482,7 +482,7 @@ impl Case { } /// Display text in small capitals. -pub fn smallcaps(_: &mut Context, args: &mut Args) -> TypResult<Value> { +pub fn smallcaps(_: &mut Machine, args: &mut Args) -> TypResult<Value> { let body: Content = args.expect("content")?; Ok(Value::Content(body.styled(TextNode::SMALLCAPS, true))) } @@ -514,7 +514,7 @@ pub struct StrongNode(pub Content); #[node(showable)] impl StrongNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { Ok(Content::show(Self(args.expect("body")?))) } } @@ -539,7 +539,7 @@ pub struct EmphNode(pub Content); #[node(showable)] impl EmphNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { Ok(Content::show(Self(args.expect("body")?))) } } diff --git a/src/library/text/par.rs b/src/library/text/par.rs index 6c274e7e..1269ffed 100644 --- a/src/library/text/par.rs +++ b/src/library/text/par.rs @@ -51,7 +51,7 @@ impl ParNode { #[property(resolve)] pub const LINEBREAKS: Smart<Linebreaks> = Smart::Auto; - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { // The paragraph constructor is special: It doesn't create a paragraph // node. Instead, it just ensures that the passed content lives is in a // separate paragraph and styles it. @@ -172,7 +172,7 @@ pub struct ParbreakNode; #[node] impl ParbreakNode { - fn construct(_: &mut Context, _: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, _: &mut Args) -> TypResult<Content> { Ok(Content::Parbreak) } } @@ -182,7 +182,7 @@ pub struct LinebreakNode; #[node] impl LinebreakNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { let justified = args.named("justified")?.unwrap_or(false); Ok(Content::Linebreak { justified }) } diff --git a/src/library/text/raw.rs b/src/library/text/raw.rs index f44877ca..fe1f9a99 100644 --- a/src/library/text/raw.rs +++ b/src/library/text/raw.rs @@ -35,7 +35,7 @@ impl RawNode { #[property(resolve, shorthand(around))] pub const BELOW: Option<BlockSpacing> = Some(Ratio::one().into()); - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { Ok(Content::show(Self { text: args.expect("text")?, block: args.named("block")?.unwrap_or(false), diff --git a/src/library/text/repeat.rs b/src/library/text/repeat.rs index 68036be7..9ee8286b 100644 --- a/src/library/text/repeat.rs +++ b/src/library/text/repeat.rs @@ -6,7 +6,7 @@ pub struct RepeatNode(pub LayoutNode); #[node] impl RepeatNode { - fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { + fn construct(_: &mut Machine, args: &mut Args) -> TypResult<Content> { Ok(Content::inline(Self(args.expect("body")?))) } } |
