Merge pull request #19030 from Veykril/push-wuzvopyooznm

fix: Fix markdown horizontal ruler sometimes being treated as a heading
This commit is contained in:
Lukas Wirth 2025-01-25 13:22:39 +00:00 committed by GitHub
commit c1db5da2fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -346,7 +346,7 @@ fn hover_offset(
.unique()
.reduce(|mut acc: HoverResult, HoverResult { markup, actions }| {
acc.actions.extend(actions);
acc.markup = Markup::from(format!("{}\n---\n{markup}", acc.markup));
acc.markup = Markup::from(format!("{}\n\n---\n{markup}", acc.markup));
acc
})
.map(|mut res: HoverResult| {

View file

@ -303,6 +303,7 @@ m!(ab$0c);
---
Outer
---
```rust
@ -4401,6 +4402,7 @@ fn main() {
---
size = 8, align = 8, niches = 1
---
```rust
@ -10094,6 +10096,7 @@ fn bar() {
```rust
let field: i32
```
---
```rust
@ -10128,6 +10131,7 @@ fn bar() {
---
size = 4, align = 4
---
```rust