Expand MultiLangCodeBlock snippets in agent-facing markdown exports. - #1533
Open
scottjstrand1 wants to merge 1 commit into
Open
Expand MultiLangCodeBlock snippets in agent-facing markdown exports.#1533scottjstrand1 wants to merge 1 commit into
scottjstrand1 wants to merge 1 commit into
Conversation
Static .md files and llms-full.txt now render code examples from the shared snippet registry instead of leaving raw MDX component tags for agents to parse. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Risk HIGH: Refactors the snippet registry out of MultiLangCodeBlock.tsx into a shared module and adds a new lib/ utility to expand <MultiLangCodeBlock> tags into plain markdown for LLM-facing exports.
Reasons
components/ui/MultiLangCodeBlock.tsxis modified — a.tsxfile incomponents/triggers HIGH risklib/expandMultiLangCodeBlocks.tsis a new.tsfile inlib/, which also triggers HIGH riskMultiLangCodeBlock.tsxis a shared, reusable component used across the documentation site for all multi-language code examples- The snippet registry extraction changes import paths and module boundaries, which could break existing snippet rendering if any entries are mismatched
- 234 additions and 140 deletions across 4 files represents a substantial structural refactor
Notes
- Verify that the snippet map in
data/code/snippetRegistry.tsis a 1:1 match with the original map that was removed fromMultiLangCodeBlock.tsx— any missing or miskeyed entry would silently break code examples on the live site - Confirm the regex in
expandMultiLangCodeBlocks.ts(`/<MultiLangCodeBlock\b([^>]*)/>/) handles all actual usage patterns of the component in MDX files (e.g., multiline attributes, children-based usage) - The
SNIPPET_FENCE_LANGUAGESandSNIPPET_LANGUAGE_LABELSmaps are new exports that were not previously needed — review these for correctness (e.g.,cURLcapitalization,jswebmapped tojavascript) scripts/generateLlmsTxt.tsnow callsprepareMarkdownForExportin multiple places — verify the expansion runs on the right content at the right stage of the pipeline- Author
scottjstrand1is not in the known contributors list — changes from external contributors to shared components warrant careful review
Sent by Cursor Automation: Docs PR classifier
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.


Static .md files and llms-full.txt now render code examples from the shared snippet registry instead of leaving raw MDX component tags for agents to parse.