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

Upgrade dependencies #84

Merged
merged 8 commits into from
Feb 27, 2024
Merged

Upgrade dependencies #84

merged 8 commits into from
Feb 27, 2024

Conversation

dguo
Copy link
Owner

@dguo dguo commented Feb 23, 2024

No description provided.

Comment on lines 5 to 19
const {children, className} = props;
if (!children) {
return null;
}

// An example className is "language-python"
const languageMatch = /language-(\w+)/.exec(className || "");

return (
<LightAsync
language={props.language}
PreTag="div"
children={children}
language={languageMatch?.[1] ?? "txt"}
style={a11yDark}
children={props.value || ""}
/>
Copy link
Owner Author

Choose a reason for hiding this comment

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

This is a simplified version of the react-markdown example.


It is rendered as an inline code element instead of a plain text code
block. See this issue for more context:
https://github.com/remarkjs/react-markdown/issues/776
Copy link
Owner Author

Choose a reason for hiding this comment

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

@dguo dguo merged commit 6d9e229 into main Feb 27, 2024
5 checks passed
@dguo dguo deleted the upgrade-deps branch February 27, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant