diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-11-27 23:13:59 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-11-27 23:13:59 +0100 |
| commit | 98f77e4d80324f58b1c390e555057f96836fed63 (patch) | |
| tree | ed0401fc2d80c6a5df74f1731383764a377d900d /src/parse/mod.rs | |
| parent | 475ca7a62ec99f0b4d8319410b7ee3134a5fcfec (diff) | |
Fix headings that are separated by only one newline 🚧
Previously the following lead to only one line with both heading and body:
```
# Heading
Body
```
Diffstat (limited to 'src/parse/mod.rs')
| -rw-r--r-- | src/parse/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs index d2408c7b..96ef18d2 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -100,11 +100,10 @@ fn heading(p: &mut Parser, start: Pos) -> NodeHeading { let span = Span::new(start, p.pos()); let level = (count.min(5) as u8).span_with(span); if count > 5 { - p.diag(warning!(span, "section depth larger than 6 has no effect")); + p.diag(warning!(span, "section depth should be at most 6")); } // Parse the heading contents. - p.skip_white(); let mut contents = vec![]; while p.check(|t| !matches!(t, Token::Space(n) if n >= 1)) { if let Some(node) = node(p, false) { |
