Add missing imports in markdown guide#6628
Add missing imports in markdown guide#6628josefbender wants to merge 6 commits intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughUpdated the Markdown rendering pipeline and public API: parser import expanded to include domToReact/Element, Markdown component now renders asynchronously with loading state and optional className, internal links route via Link, images use lazy loading, import paths adjusted, and content-collections schema switched to z.object with date type. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 7f0d487
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/start/framework/react/guide/rendering-markdown.md`:
- Around line 89-92: The import list for html-react-parser is missing domToReact
which causes a runtime ReferenceError when internal links are rendered; update
the import statement that currently imports parse, HTMLReactParserOptions, and
Element to also import domToReact from 'html-react-parser' so the domToReact
function used later (around the internal link rendering logic) is defined and
available.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/start/framework/react/guide/rendering-markdown.md (1)
23-24:⚠️ Potential issue | 🟡 MinorAlign the markdown utility file path with its import.
The guide says to create
src/utils/markdown.ts, but the component imports from@/lib/markdown. Please make these consistent to avoid reader confusion.Suggested doc fix
-// src/utils/markdown.ts +// src/lib/markdown.tsAlso applies to: 94-95
🤖 Fix all issues with AI agents
In `@docs/start/framework/react/guide/rendering-markdown.md`:
- Around line 176-179: The schema's published field uses z.date() which rejects
YAML/frontmatter date strings produced by gray-matter; update the schema in the
z.object (the fields title, published, description) to coerce strings to dates
by replacing published: z.date() with published: z.coerce.date(), or for
stricter ISO validation use published:
z.string().datetime().pipe(z.coerce.date()); ensure the transform/validator that
reads frontmatter uses the updated schema so string dates are accepted and
converted.
Summary by CodeRabbit