mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
fix: bad route to reference pages (#1641)
* test: add tests * fix: bad route
This commit is contained in:
parent
5c6d9a5dee
commit
fcb060280d
4 changed files with 445 additions and 13 deletions
1
crates/tinymist-query/src/fixtures/hover/cases_doc.typ
Normal file
1
crates/tinymist-query/src/fixtures/hover/cases_doc.typ
Normal file
|
@ -0,0 +1 @@
|
|||
$ /* ident after */ cases $
|
|
@ -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/cases_doc.typ
|
||||
---
|
||||
{
|
||||
"contents": "```typc\nlet cases(\n ..children: content,\n delim: array | none | str | symbol = (\"{\", \"}\"),\n gap: relative = 0% + 0.2em,\n reverse: bool = false,\n);\n```\n\n---\n\nA case distinction.\n\nContent across different branches can be aligned with the `&` symbol.\n\n# Example\n```typ\n$ f(x, y) := cases(\n 1 \"if\" (x dot y)/2 <= 0,\n 2 \"if\" x \"is even\",\n 3 \"if\" x in NN,\n 4 \"else\",\n) $\n```\n\n---\n\nA case distinction.\n\nContent across different branches can be aligned with the `&` symbol.\n\n# Example\n```typ\n$ f(x, y) := cases(\n 1 \"if\" (x dot y)/2 <= 0,\n 2 \"if\" x \"is even\",\n 3 \"if\" x in NN,\n 4 \"else\",\n) $\n```\n\n# Rest Parameters\n\n## children\n\n```typc\ntype: content\n```\n\nThe branches of the case distinction.\n\n# Named Parameters\n\n## delim\n\n```typc\ntype: array | none | str | symbol\n```\n\nThe delimiter to use.\n\nCan be a single character specifying the left delimiter, in which case\nthe right delimiter is inferred. Otherwise, can be an array containing a\nleft and a right delimiter.\n\n```typ\n#set math.cases(delim: \"[\")\n$ x = cases(1, 2) $\n```\n\n## gap (named)\n\n```typc\ntype: relative\n```\n\nThe gap between branches.\n\n```typ\n#set math.cases(gap: 1em)\n$ x = cases(1, 2) $\n```\n\n## reverse (named)\n\n```typc\ntype: bool\n```\n\nWhether the direction of cases should be reversed.\n\n```typ\n#set math.cases(reverse: true)\n$ cases(1, 2) = x $\n```\n\n---\n\n[Open docs](https://typst.app/docs/reference/math/cases/)",
|
||||
"range": "0:20:0:25"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue