-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor @astrojs/prism, fix Prism component import not working #4114
Conversation
🦋 Changeset detectedLatest commit: ac6d609 The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Missing a changeset. |
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.
Clean refactor! Had a few comments but LGTM overall.
import Prism from 'prismjs'; | ||
import { addAstro } from './internal.mjs'; | ||
import loadLanguages from 'prismjs/components/index.js'; | ||
import { runHighlighterWithAstro } from './dist/highlighter'; |
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.
While we're at it, is there a place that makes more sense than packages/astro-prism
? I think that's leftover from when the package was literally named astro-prism
. Maybe just packages/prism
?
Changes
runHighlight
to itmarkdown-remark
and@astrojs/mdx
This makes the dependency of
@astrojs/prism
much clearer, previously a lot of packages independently depended on eitherprismjs
or@astrojs/prism
. Now all the packages who needs it depend on@astrojs/prism
(who itself, obviously depends onprismjs
)Testing
Tests still pass
Docs
N/A