diff --git a/crates/tinymist-query/src/docs/tidy.rs b/crates/tinymist-query/src/docs/tidy.rs index c92ab1ec..7aed11b8 100644 --- a/crates/tinymist-query/src/docs/tidy.rs +++ b/crates/tinymist-query/src/docs/tidy.rs @@ -76,6 +76,7 @@ pub fn identify_func_docs(converted: &str) -> StrResult { continue; }; + break_line = Some(i); return_ty = Some(w.trim().into()); break; } diff --git a/crates/tinymist-query/src/fixtures/hover/annotate_ret.typ b/crates/tinymist-query/src/fixtures/hover/annotate_ret.typ new file mode 100644 index 00000000..8d521a8d --- /dev/null +++ b/crates/tinymist-query/src/fixtures/hover/annotate_ret.typ @@ -0,0 +1,8 @@ + +/// -> content +#let _delayed-wrapper(body) = utils.label-it( + metadata((kind: "touying-delayed-wrapper", body: body)), + "touying-temporary-mark", +) + +#(/* ident after */ _delayed-wrapper); diff --git a/crates/tinymist-query/src/fixtures/hover/snaps/test@annotate_ret.typ.snap b/crates/tinymist-query/src/fixtures/hover/snaps/test@annotate_ret.typ.snap new file mode 100644 index 00000000..23ce0600 --- /dev/null +++ b/crates/tinymist-query/src/fixtures/hover/snaps/test@annotate_ret.typ.snap @@ -0,0 +1,9 @@ +--- +source: crates/tinymist-query/src/hover.rs +expression: "JsonRepr::new_redacted(result, &REDACT_LOC)" +input_file: crates/tinymist-query/src/fixtures/hover/annotate_ret.typ +--- +{ + "contents": "```typc\nlet _delayed-wrapper(\n body,\n) = content;\n```\n\n---\n## Parameters\n\n@positional `body`", + "range": "6:20:6:36" +}