diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-25 13:50:33 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-25 13:59:06 +0200 |
| commit | c010cbc17dcbb2f0d6005d21530143bf57cb5871 (patch) | |
| tree | 937fe79f0c121bcc025480181287fd4a3d0c0f4f /src/library/text/mod.rs | |
| parent | 6935cf8dfefff3d6cf234f077a7d61661fd5ca57 (diff) | |
Move route from context to VM
Diffstat (limited to 'src/library/text/mod.rs')
| -rw-r--r-- | src/library/text/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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")?))) } } |
