Preserve Markdown route fidelity - #4119
Open
thodges-gh wants to merge 5 commits into
Open
Conversation
Make the shared MarkdownArtifact builder the only generator for the .md route and project supported MDX components and language branches into Markdown. Add a zero-network fidelity checker that compares raw source facts and blocks non-exempt losses.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
👋 thodges-gh, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
Author
|
Replaces #4110 |
Replace quantified slash-trimming regexes with a linear index scan and cover long leading and trailing slash runs.
Route Aside conversion through the existing MDX AST handler and add regression coverage for long repeated input.
Route ClickToZoom conversion through the existing MDX AST handler and simplify fallback component stripping to one linear regular expression. Add regression coverage for repeated input and fallback output.
Replace fallback tag, static import, selector, frontmatter, and highlighter regular expressions with bounded string scanners. Add repeated malformed-input coverage for each scanner.
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.
Description
Some public documentation pages are also served as Markdown (
.md) for tools and agents. The conversion could silently remove text, links, code, or other useful content when the source MDX used a component that the converter did not handle.This PR fixes known content losses in the production converter. It adds Markdown output for
PageTabs,Tabs,TabsContent,PackageManagerTabs,Fragment,Accordion,Address,Callout, reusable callout selectors,SchemaFieldsTable, and static language branches. For example, the CRE CLI installation pages now keep the operating-system heading and ordered macOS / Linux and Windows links. The Data Feeds contract registry now keeps each contract address as a normal Markdown link.This PR does not fix every existing Markdown loss. The full documentation set still has known missing, unsupported, unverifiable, and degraded findings.
npm run check:markdown-fidelityis both a regression check and an inventory of the remaining work. It compares source MDX with output from the sameMarkdownArtifactbuilder used by the public.mdroute. The normal site build can succeed even when Markdown content disappears, so this separate check is needed. Focused--pathruns fail on non-exempt losses. The full run compares its findings with a checked-in baseline, which allows existing problems to be fixed one at a time but fails when a new finding is added. The command makes no model or network calls, needs no credentials, and adds no dependency.Verification
Some problematic example pages before/after.
Before:
After:
Before:
After:
Additional checks, run:
Report is saved in
reports/markdown-fidelity-report.json. Use the following command to show only problems:What the statuses mean