summaryrefslogtreecommitdiff
path: root/src/syntax/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/mod.rs')
-rw-r--r--src/syntax/mod.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index b4908ff2..5857940c 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -590,8 +590,6 @@ pub enum NodeKind {
Linebreak,
/// A consecutive non-markup string.
Text(EcoString),
- /// A text node that cannot appear at the beginning of a source line.
- TextInLine(EcoString),
/// A non-breaking space: `~`.
NonBreakingSpace,
/// An en-dash: `--`.
@@ -757,6 +755,7 @@ impl NodeKind {
pub fn only_at_start(&self) -> bool {
match self {
Self::Heading | Self::Enum | Self::List => true,
+ Self::Text(t) => t == "-" || t.ends_with('.'),
_ => false,
}
}
@@ -767,7 +766,6 @@ impl NodeKind {
Self::Markup(_)
| Self::Linebreak
| Self::Text(_)
- | Self::TextInLine(_)
| Self::NonBreakingSpace
| Self::EnDash
| Self::EmDash
@@ -859,7 +857,7 @@ impl NodeKind {
Self::Space(2 ..) => "paragraph break",
Self::Space(_) => "space",
Self::Linebreak => "forced linebreak",
- Self::Text(_) | Self::TextInLine(_) => "text",
+ Self::Text(_) => "text",
Self::NonBreakingSpace => "non-breaking space",
Self::EnDash => "en dash",
Self::EmDash => "em dash",
@@ -980,7 +978,6 @@ impl Hash for NodeKind {
Self::Space(n) => n.hash(state),
Self::Linebreak => {}
Self::Text(s) => s.hash(state),
- Self::TextInLine(s) => s.hash(state),
Self::NonBreakingSpace => {}
Self::EnDash => {}
Self::EmDash => {}