diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-24 21:36:41 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-24 21:38:23 +0200 |
| commit | 2f33ad0e0aa3d1f4a949025597bf1ea36256831f (patch) | |
| tree | c98bff188e35d0836384418c7da1635660b10fe7 /src/syntax | |
| parent | 2791f59ce2404d0483aee92b8231df95aa45b7a5 (diff) | |
Rename soft linebreak to justified linebreak
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/ast.rs | 6 | ||||
| -rw-r--r-- | src/syntax/mod.rs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index 82bb7d56..5232b1f1 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -62,7 +62,7 @@ impl Markup { self.0.children().filter_map(|node| match node.kind() { NodeKind::Space(2 ..) => Some(MarkupNode::Parbreak), NodeKind::Space(_) => Some(MarkupNode::Space), - NodeKind::Linebreak(s) => Some(MarkupNode::Linebreak(*s)), + NodeKind::Linebreak(j) => Some(MarkupNode::Linebreak(*j)), NodeKind::Text(s) => Some(MarkupNode::Text(s.clone())), NodeKind::Escape(c) => Some(MarkupNode::Text((*c).into())), NodeKind::NonBreakingSpace => Some(MarkupNode::Text('\u{00A0}'.into())), @@ -88,8 +88,8 @@ impl Markup { pub enum MarkupNode { /// Whitespace containing less than two newlines. Space, - /// A forced line break. If soft (`\`, `true`), the preceding line can still - /// be justified, if hard (`\+`, `false`) not. + /// A forced line break. If `true` (`\`), the preceding line can still be + /// justified, if `false` (`\+`) not. Linebreak(bool), /// A paragraph break: Two or more newlines. Parbreak, diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index 00bcb376..2272b3e0 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -588,8 +588,8 @@ pub enum NodeKind { Space(usize), /// A consecutive non-markup string. Text(EcoString), - /// A forced line break. If soft (`\`, `true`), the preceding line can still - /// be justified, if hard (`\+`, `false`) not. + /// A forced line break. If `true` (`\`), the preceding line can still be + /// justified, if `false` (`\+`) not. Linebreak(bool), /// A non-breaking space: `~`. NonBreakingSpace, @@ -867,8 +867,8 @@ impl NodeKind { Self::Markup(_) => "markup", Self::Space(2 ..) => "paragraph break", Self::Space(_) => "space", - Self::Linebreak(false) => "hard linebreak", - Self::Linebreak(true) => "soft linebreak", + Self::Linebreak(false) => "linebreak", + Self::Linebreak(true) => "justified linebreak", Self::Text(_) => "text", Self::NonBreakingSpace => "non-breaking space", Self::Shy => "soft hyphen", |
