-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[Bug]: Elvis (?) is breaking autodocs and 'show source' for Svelte components #24008
Labels
Comments
This is caused by alexprey/sveltedoc-parser#87 sveltedoc-parser fails to parse the component. The documentation is not injected into the source, and we use this documentation to lookup the name of the component. If the documentation is not present, then we call 'component.name'. In the case of the example here, 'component.name' links to the Proxy HMR from vite. |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Under a number of circumstances when an Elvis (?) operator is being used, the "autodocs" function stops working and the jsdoc description does not appear inside the storybook properties documentation. Also, the 'show source' function starts delivering incorrect and confusing code.
To Reproduce
I used the Button example of a new Svelte based Storybook installation for simplicity:
See line 14 as an example:
https://stackblitz.com/edit/github-tqvcar?file=src%2Fstories%2FButton.svelte
Furthermore, I realized that "?"- operators inside the Svelte components HTML / Svelte code, lead to the same situation.
Also the description must be before the @type jsdoc command and not after. Otherwise, it does not appear.
System
Additional context
The text was updated successfully, but these errors were encountered: