aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ast.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ast.rs b/src/ast.rs
index 69ad123..8f8495e 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -231,7 +231,15 @@ fn evaluate(
nodes.push(Node::Link {
to: split.next().expect("no location in link"),
- text: split.next(),
+ text: {
+ let rest = split.collect::<Vec<String>>().join(" ");
+
+ if rest.is_empty() {
+ None
+ } else {
+ Some(rest)
+ }
+ },
});
break;