diff options
| author | Martin Haug <mhaug@live.de> | 2022-02-21 13:48:21 +0100 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-02-21 13:48:21 +0100 |
| commit | aac3afcba8ee9b3692f784c78626aa0596aaf612 (patch) | |
| tree | 1350fadea7f619503342b2c7a6e9a44d86e83f66 /src/syntax/ast.rs | |
| parent | 61761604e431cbb1f0bc66671e90c20aa19f98b4 (diff) | |
Remove `Parbreak` as a `NodeKind`
Diffstat (limited to 'src/syntax/ast.rs')
| -rw-r--r-- | src/syntax/ast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index 9d22121b..7992f9de 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -60,9 +60,9 @@ impl Markup { /// The markup nodes. pub fn nodes(&self) -> impl Iterator<Item = MarkupNode> + '_ { self.0.children().filter_map(|node| match node.kind() { + NodeKind::Space(n) if *n > 1 => Some(MarkupNode::Parbreak), NodeKind::Space(_) => Some(MarkupNode::Space), NodeKind::Linebreak => Some(MarkupNode::Linebreak), - NodeKind::Parbreak => Some(MarkupNode::Parbreak), NodeKind::Text(s) | NodeKind::TextInLine(s) => { Some(MarkupNode::Text(s.clone())) } |
