From 65ee34a229c19a5e297dd188708f335b312564bb Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 May 2022 23:08:36 +0000 Subject: fix(ast): take rest of iterator as text for link --- src/ast.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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::>().join(" "); + + if rest.is_empty() { + None + } else { + Some(rest) + } + }, }); break; -- cgit v1.2.3