If you embed an example inside a blockquote (>) then it cannot be parsed and errors (it treats the > of the code blocks as part of the source code).
/**
* Documentation of my function.
*
* > [!WARNING]
* > This is inside a warning block.
* >
* > ```ts
* > function foo() {
* > return "bar"
* > }
* > ```
*/
export function foo() {
return "bar"
}
vscode ➜ /workspaces/deno$ deno test --doc -A test.ts
error: Expression expected at file:///workspaces/deno/test.ts$7-12.ts:2:5
> return "bar"
~~~~~~
vscode ➜ /workspaces/deno$ deno --version
deno 2.0.0-rc.9 (release candidate, release, x86_64-unknown-linux-gnu)
v8 12.9.202.13-rusty
typescript 5.6.2
If you embed an example inside a blockquote (
>) then it cannot be parsed and errors (it treats the>of the code blocks as part of the source code).