Load the languages of embedded code in the Autoloader - #4135
Merged
Merged
Conversation
✅ Deploy Preview for dev-prismjs-com ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
DmitrySharabin
force-pushed
the
claude/autoloader-embedded-languages
branch
4 times, most recently
from
October 1, 2026 16:14
960c18b to
46e46fa
Compare
- Markdown fences, markup `<style>`/`<script>` and pug/haml filters mark embedded code with `language-<id>`; the Autoloader now loads those too, each on its own, and reports a failed one once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DmitrySharabin
force-pushed
the
claude/autoloader-embedded-languages
branch
from
October 1, 2026 16:23
46e46fa to
20661db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Autoloader's
completehook now also loads the languages of tokens markedlanguage-<id>inside the element. Markdown fences (#4133), markup<style>/<script>, and pug and haml filters mark their embedded code that way.errorHandleronce and never retried. The element is highlighted again only if something loaded, so anonefence can't loop.loadLanguageskeeps its public behavior. The failed ids live in the hook.data-dependenciesthat only names an embedded language is no longer needed, like the pug:lessexample in the README.src/plugins/autoloader/autoloader.jstests/plugins/autoloader/basic-functionality.jssrc/plugins/autoloader/README.md🤖 Generated with Claude Code