validateDOMNesting error when displaying a URL generated by compodocs
See original GitHub issueBug
In an Angular project Storybook is displaying this console error for a link generated by Compodocs
Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>.
in a (created by Markdown)
in a (created by Markdown)
in p (created by Markdown)
in Markdown (created by ArgRow)
in div (created by Context.Consumer)
in Styled(div) (created by ArgRow)
...
Steps to reproduce
Add JSDocs to an @Input in an angular component
/**
* This is a test
* https://example.com
*/
or
/**
* This is a test
* {@link https://example.com|Example}
*/
Then run storybook to generate the docs and start the site
Compodocs generates this in documentation.json
<p>This is a test\n<a href=\"https://example.com\">https://example.com</a></p>
and then Storybook wraps this in another pair of <a> tags
<p>This is a test
<a href="https://example.com">
<a href="https://example.com">https://example.com</a>
</a>
</p>
Please specify which version of Storybook and optionally any affected addons that you’re running
- @storybook/angular 6.1.21
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to fix Warning: validateDOMNesting(...): <div> cannot ...
This is why get the error. A fix would be to wrap the Spinner into a td that spans the whole row: if...
Read more >validatedomnesting(...): <li> cannot appear as a descendant of ...
I am using react ı take a bootsrap navbar and changed the a to Link but now ı get a error message like...
Read more >storybookjs/storybook (Raised $170.00) - Issuehunt
validateDOMNesting error when displaying a URL generated by compodocs. Unfunded#14176created bydexster. $0.00. Add option to show globalTypes name in ...
Read more >comment js Code Example - Code Grepper
node_modules/sass-loader/lib/loader.js): Error: ENOENT: no such file or directory, scandir ... javascript generate random color site:stackoverflow.com ...
Read more >vue 3 router 404 - Indusan
... using OSX dark theme, validateDOMNesting error when displaying a URL generated by compodocs, Add an option to nuxt generate to generate a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@shilman @dexster my PR to the library has been merged 😄 and now I opened a PR to Storybook to update the library version: https://github.com/storybookjs/storybook/pull/15083
@dexster @shilman I opened a PR to
markdown-to-jsxfixing this issue, if it does get merged we can update the library version here to fix this issue probablyup/markdown-to-jsx#381