summaryrefslogtreecommitdiff
path: root/src/syntax/pretty.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-17 22:04:18 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-17 22:20:37 +0200
commit594809e35b9e768f1a50926cf5e7a9df41ba7d16 (patch)
tree488f201599a67329d7916b9b3ecb73dd27ad24d7 /src/syntax/pretty.rs
parentc53d98a22f367a9eecfb45d1b22f1be5c6cf908d (diff)
Library functions behave more imperatively
- Templates scope state changes - State-modifying function operate in place instead of returning a template - Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map - No more wide calls
Diffstat (limited to 'src/syntax/pretty.rs')
-rw-r--r--src/syntax/pretty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syntax/pretty.rs b/src/syntax/pretty.rs
index 40ebf758..cf9ee69d 100644
--- a/src/syntax/pretty.rs
+++ b/src/syntax/pretty.rs
@@ -88,11 +88,11 @@ impl Pretty for SyntaxNode {
match self {
// TODO: Handle escaping.
Self::Space => p.push(' '),
- Self::Text(text) => p.push_str(text),
Self::Linebreak(_) => p.push_str(r"\"),
Self::Parbreak(_) => p.push_str("\n\n"),
Self::Strong(_) => p.push('*'),
Self::Emph(_) => p.push('_'),
+ Self::Text(text) => p.push_str(text),
Self::Raw(raw) => raw.pretty(p),
Self::Heading(n) => n.pretty(p),
Self::List(n) => n.pretty(p),