diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-18 14:31:51 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-18 14:31:51 +0100 |
| commit | 9b8c1dc19fcda399f00e486460b4cc521d1a460b (patch) | |
| tree | 993e6045643c63ed957d81d8a3bdf0873b1ac2bb /library | |
| parent | 92f2c56203c6528e35ec1feae14e5dd2c2425311 (diff) | |
Pass text node to text show rule instead of string
Diffstat (limited to 'library')
| -rw-r--r-- | library/src/text/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs index 1ab1c37d..6cf1e1c5 100644 --- a/library/src/text/mod.rs +++ b/library/src/text/mod.rs @@ -167,6 +167,13 @@ impl TextNode { } } } + + fn field(&self, name: &str) -> Option<Value> { + match name { + "text" => Some(Value::Str(self.0.clone().into())), + _ => None, + } + } } impl Debug for TextNode { |
