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

jsdoc @example directive is broken: no syntax highlighting #884

Open
paulmillr opened this issue Jan 8, 2025 · 0 comments
Open

jsdoc @example directive is broken: no syntax highlighting #884

paulmillr opened this issue Jan 8, 2025 · 0 comments

Comments

@paulmillr
Copy link

Consider this JS/ts code:

/**
 * Creates new QRCamera from frontal camera
 * @example
 * const canvas = new QRCanvas();
 * const camera = frontalCamera();
 */
export async function frontalCamera(player: HTMLVideoElement): Promise<QRCamera>

Example directive is perfectly valid JS code, and has always been. However, JSR doesn't highlight it -- and even worse, doesn't even add line-breaks. JSR needs this:

@example
```js
const canvas = new QRCanvas();
const camera = frontalCamera();
```

It's unreasonable to require all jsdoc code example to be replaced by this flavored markdown just because you can't fix your code.

@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant