diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-01-30 12:50:58 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-01-30 22:46:59 +0100 |
| commit | 8d1ce390e21ce0a5812a4211c893ec359906d6f1 (patch) | |
| tree | 5dbe1ad96af8ce8f9f01887340fe06025462e959 /src/parse/incremental.rs | |
| parent | d7072f378fef733ae994fd9a1e767df4e4dd878e (diff) | |
Rework strong and emph
- Star and underscore not parsed as strong/emph inside of words
- Stars/underscores must be balanced and they cannot go over paragraph break
- New `strong` and `emph` classes
Diffstat (limited to 'src/parse/incremental.rs')
| -rw-r--r-- | src/parse/incremental.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parse/incremental.rs b/src/parse/incremental.rs index 9dd5bec1..fb927c24 100644 --- a/src/parse/incremental.rs +++ b/src/parse/incremental.rs @@ -435,10 +435,12 @@ impl NodeKind { | Self::LeftParen | Self::RightParen => SuccessionRule::Unsafe, + // These work similar to parentheses. + Self::Star | Self::Underscore => SuccessionRule::Unsafe, + // Replacing an operator can change whether the parent is an - // operation which makes it unsafe. The star can appear in markup. - Self::Star - | Self::Comma + // operation which makes it unsafe. + Self::Comma | Self::Semicolon | Self::Colon | Self::Plus |
