diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-04-21 21:17:25 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-04-21 21:17:25 +0200 |
| commit | 72478946c261f04754c11f8a6abf6eb0f43dea31 (patch) | |
| tree | b2a621804d39ace4e57ec4a51b34d40bb4a98987 /src/syntax/node.rs | |
| parent | df58a4d89b67783b1ffc5c3b7282302d59db8c70 (diff) | |
Make frames serializable 📚
This also makes serialization support non-optional since it's too much feature-management for too little benefit.
Diffstat (limited to 'src/syntax/node.rs')
| -rw-r--r-- | src/syntax/node.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/syntax/node.rs b/src/syntax/node.rs index 537a5686..5f76b56a 100644 --- a/src/syntax/node.rs +++ b/src/syntax/node.rs @@ -37,15 +37,15 @@ impl Node { /// Desugar markup into a function call. pub fn desugar(&self) -> Option<CallExpr> { match *self { - Node::Text(_) => None, - Node::Space => None, - Node::Linebreak(span) => Some(call(span, Self::LINEBREAK)), - Node::Parbreak(span) => Some(call(span, Self::PARBREAK)), - Node::Strong(span) => Some(call(span, Self::STRONG)), - Node::Emph(span) => Some(call(span, Self::EMPH)), + Self::Text(_) => None, + Self::Space => None, + Self::Linebreak(span) => Some(call(span, Self::LINEBREAK)), + Self::Parbreak(span) => Some(call(span, Self::PARBREAK)), + Self::Strong(span) => Some(call(span, Self::STRONG)), + Self::Emph(span) => Some(call(span, Self::EMPH)), Self::Heading(ref heading) => Some(heading.desugar()), Self::Raw(ref raw) => Some(raw.desugar()), - Node::Expr(_) => None, + Self::Expr(_) => None, } } } |
