mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Fix incorrect newline emission in Attrs::docs
This commit is contained in:
parent
ec824a92d0
commit
5734b347dd
4 changed files with 80 additions and 62 deletions
|
@ -1533,12 +1533,21 @@ fn my() {}
|
|||
fn test_hover_struct_doc_comment() {
|
||||
check(
|
||||
r#"
|
||||
/// bar docs
|
||||
/// This is an example
|
||||
/// multiline doc
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// let five = 5;
|
||||
///
|
||||
/// assert_eq!(6, my_crate::add_one(5));
|
||||
/// ```
|
||||
struct Bar;
|
||||
|
||||
fn foo() { let bar = Ba$0r; }
|
||||
"#,
|
||||
expect![[r#"
|
||||
expect![[r##"
|
||||
*Bar*
|
||||
|
||||
```rust
|
||||
|
@ -1551,8 +1560,17 @@ fn foo() { let bar = Ba$0r; }
|
|||
|
||||
---
|
||||
|
||||
bar docs
|
||||
"#]],
|
||||
This is an example
|
||||
multiline doc
|
||||
|
||||
# Example
|
||||
|
||||
```
|
||||
let five = 5;
|
||||
|
||||
assert_eq!(6, my_crate::add_one(5));
|
||||
```
|
||||
"##]],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue