File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ use text_edit::TextEdit;
18
18
//
19
19
// - kbd:[Enter] inside triple-slash comments automatically inserts `///`
20
20
// - kbd:[Enter] in the middle or after a trailing space in `//` inserts `//`
21
+ // - kbd:[Enter] inside `//!` doc comments automatically inserts `//!`
21
22
//
22
23
// This action needs to be assigned to shortcut explicitly.
23
24
//
@@ -186,6 +187,25 @@ fn foo() {
186
187
do_check_noop ( r"$0//! docz" ) ;
187
188
}
188
189
190
+ #[ test]
191
+ fn continues_another_doc_comment ( ) {
192
+ do_check (
193
+ r#"
194
+ fn main() {
195
+ //! Documentation for$0 on enter
196
+ let x = 1 + 1;
197
+ }
198
+ "# ,
199
+ r#"
200
+ fn main() {
201
+ //! Documentation for
202
+ //! $0 on enter
203
+ let x = 1 + 1;
204
+ }
205
+ "# ,
206
+ ) ;
207
+ }
208
+
189
209
#[ test]
190
210
fn continues_code_comment_in_the_middle_of_line ( ) {
191
211
do_check (
You can’t perform that action at this time.
0 commit comments