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

[WNMGDS-3243] Upgraded Gatsby to v5 #3477

Merged
merged 17 commits into from
Mar 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes code and pre formatting
kim-cmsds committed Mar 17, 2025

Verified

This commit was signed with the committer’s verified signature.
kim-cmsds Kim Niedermaier
commit 229d2ed5e328318ae8123459f20d8033dd5903ef
5 changes: 4 additions & 1 deletion packages/docs/src/components/content/ContentRenderer.tsx
Original file line number Diff line number Diff line change
@@ -54,7 +54,10 @@ const CodeWithSyntaxHighlighting = ({
// for preformatted text that has code as it's child, set language class on <pre> too
// this allows scrolling in code block on small screens
const PreformattedWithLanguageClass = (props: any) => {
if (props.children?.props?.mdxType === 'code' && props.children?.props?.className) {
if (
props.children?.type?.name === 'CodeWithSyntaxHighlighting' &&
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this type changed and ensures styling for code blocks is unchanged

props.children?.props?.className
) {
return <pre className={props.children.props.className} {...props} />;
}
return <pre {...props} />;