aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/hover.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-03-17 13:38:11 +0000
committerLukas Wirth <[email protected]>2021-03-17 13:48:57 +0000
commitec824a92d05caa1908cb25cbd5b969c8e995aaa7 (patch)
tree4d64f1a745735200fbdbc3df564f1471d1b44be1 /crates/ide/src/hover.rs
parent0fbfab3b45af7a02b1224bca4a53e9b8f6ec049e (diff)
Better handling of block doc comments
Diffstat (limited to 'crates/ide/src/hover.rs')
-rw-r--r--crates/ide/src/hover.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 325014622..cc2b79124 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -3424,6 +3424,40 @@ mod Foo$0 {
3424 } 3424 }
3425 3425
3426 #[test] 3426 #[test]
3427 fn hover_doc_block_style_indentend() {
3428 check(
3429 r#"
3430/**
3431 foo
3432 ```rust
3433 let x = 3;
3434 ```
3435*/
3436fn foo$0() {}
3437"#,
3438 expect![[r#"
3439 *foo*
3440
3441 ```rust
3442 test
3443 ```
3444
3445 ```rust
3446 fn foo()
3447 ```
3448
3449 ---
3450
3451 foo
3452
3453 ```rust
3454 let x = 3;
3455 ```
3456 "#]],
3457 );
3458 }
3459
3460 #[test]
3427 fn hover_comments_dont_highlight_parent() { 3461 fn hover_comments_dont_highlight_parent() {
3428 check_hover_no_result( 3462 check_hover_no_result(
3429 r#" 3463 r#"