fix: strip out the line containing the return type (#803)

This commit is contained in:
Myriad-Dreamin 2024-11-13 23:51:29 +08:00 committed by GitHub
parent 58b8015386
commit 41868aa0f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 0 deletions

View file

@ -76,6 +76,7 @@ pub fn identify_func_docs(converted: &str) -> StrResult<TidyFuncDocs> {
continue;
};
break_line = Some(i);
return_ty = Some(w.trim().into());
break;
}

View file

@ -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);

View file

@ -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"
}