Skip to content

feat(markdown): add text transform helper - #6342

Merged
cixzhang merged 2 commits into
mainfrom
feat/markdown-text-transform
Sep 20, 2026
Merged

cixzhang merged 2 commits into
mainfrom
feat/markdown-text-transform

Conversation

@cixzhang

@cixzhang cixzhang commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Builder impact

Markdown builders can replace matched prose with typed Markdown nodes without preprocessing source or entering protected content such as code, links, images, citations, math, or prior extension syntax.

Depends on #6338, #6339, and #6340.

What changed

  • adds createMarkdownTextTransform() as a helper that compiles to the core immutable transform protocol;
  • preserves structural sharing when no eligible text changes;
  • supports ordered replacement, removal, bounded claim extension/decline, and parent-kind context;
  • adds optional exact requiredSubstrings prefilters so hinted no-claim helpers skip AST traversal;
  • adds a TODO demo plugin to the shared Markdown composition story.

AST-036 scope

This PR implements the text-helper portions of FR1, FR6, FR7, FR10–FR13, and FR21. It adds the hinted no-claim fast-path evidence needed by FR23; the complete representative and hintless helper budget remains for the combined helper stack after semantic-fence and source-decoration support land.

Validation

  • Core TypeScript check
  • changed-file ESLint and Prettier
  • 372 non-performance Markdown/Outline tests
  • 18 parser/helper performance tests
  • exact 200/500-section alternating paired benchmark: stable and recreated lists of five hinted no-claim helpers stayed within the 1.15 ratio
  • production Storybook build

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 20, 2026 8:39am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Sep 16, 2026, 8:12 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 16, 2026
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from ff369d4 to 24aa733 Compare September 16, 2026 07:22
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from 24aa733 to d6f9353 Compare September 16, 2026 07:29
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch 2 times, most recently from 5361125 to 7a93fbd Compare September 16, 2026 07:35
@cixzhang
cixzhang marked this pull request as ready for review September 16, 2026 07:36
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from 7a93fbd to b7ab123 Compare September 16, 2026 07:38
@cixzhang
cixzhang force-pushed the feat/markdown-plugin-core branch from d9949cd to 1a3bb1d Compare September 16, 2026 08:00
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from b7ab123 to 1602e97 Compare September 16, 2026 08:00
@cixzhang
cixzhang force-pushed the feat/markdown-plugin-core branch from 1a3bb1d to 15a2d46 Compare September 16, 2026 11:57
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from 1602e97 to ead0626 Compare September 19, 2026 22:33
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from ead0626 to 062ada2 Compare September 20, 2026 00:14
@cixzhang
cixzhang force-pushed the feat/markdown-plugin-core branch from 5bcbef8 to 620e1e7 Compare September 20, 2026 06:12
@cixzhang
cixzhang changed the base branch from feat/markdown-plugin-core to main September 20, 2026 07:16
@cixzhang
cixzhang force-pushed the feat/markdown-text-transform branch from 062ada2 to 28b35aa Compare September 20, 2026 07:16
@cixzhang
cixzhang enabled auto-merge (squash) September 20, 2026 07:16
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Sep 20, 2026
github-actions Bot added a commit that referenced this pull request Sep 20, 2026
@cixzhang
cixzhang merged commit eec3a19 into main Sep 20, 2026
31 of 32 checks passed
@github-actions
github-actions Bot deleted the feat/markdown-text-transform branch September 21, 2026 06:29

This branch was successfully deployed

1 active deployment
Preview 10384aa7 Deployed Sep 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant