This commit is contained in:
eaglgenes101 2020-02-20 12:46:50 -05:00
commit bf99a6eb08

View file

@ -42,7 +42,7 @@ pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<Sour
let prefix = comment.prefix(); let prefix = comment.prefix();
let comment_range = comment.syntax().text_range(); let comment_range = comment.syntax().text_range();
if position.offset < comment_range.start() + TextUnit::of_str(prefix) + TextUnit::from(1) { if position.offset < comment_range.start() + TextUnit::of_str(prefix) {
return None; return None;
} }
@ -265,6 +265,19 @@ fn main() {
// <|> me // <|> me
let x = 1 + 1; let x = 1 + 1;
} }
",
);
do_check(
r"
///<|> Some docs
fn foo() {
}
",
r"
///
/// <|> Some docs
fn foo() {
}
", ",
); );
do_check_noop( do_check_noop(