Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno test --doc fails if the code is inside a blockquote #25980

Open
lowlighter opened this issue Oct 2, 2024 · 0 comments
Open

deno test --doc fails if the code is inside a blockquote #25980

lowlighter opened this issue Oct 2, 2024 · 0 comments
Labels
bug Something isn't working correctly testing related to deno test and coverage

Comments

@lowlighter
Copy link
Contributor

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
@littledivy littledivy added bug Something isn't working correctly testing related to deno test and coverage 2.0 feedback labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly testing related to deno test and coverage
Projects
None yet
Development

No branches or pull requests

3 participants