-
Couldn't load subscription status.
- Fork 30
Fix some invalid HTML issues #2038
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
base: main
Are you sure you want to change the base?
Conversation
| > | ||
| <Typography | ||
| variant="sectionTitle" | ||
| component={'div'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component contains divs, so it cannot be a p.
| vi.mock('./widget/MarkdownSynapsePlot', () => ({ | ||
| default: vi | ||
| .fn() | ||
| .mockReturnValue(<figure data-testid={'MarkdownSynapsePlot'}></figure>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
figure cannot be in a p, so fix this invalid mock.
| const Tag: keyof JSX.IntrinsicElements | typeof Fragment = | ||
| element.tagName.toLowerCase() === 'body' | ||
| ? Fragment // The component ultimately wraps this content, so if the tag is 'body', we use Fragment to avoid an extra nested element | ||
| : (element.tagName.toLowerCase() as keyof JSX.IntrinsicElements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I previously changed the body element to map to a fragment, but this causes us to add props to the Fragment, which is invalid. Instead, map the body tag directly to the wrapper element.
Fix invalid HTML issues in