feat: simple markdown#17131
Conversation
- For use with in-page markdown content parsing, not full pages with front matter - Simplifies use of headers to bold paragraphs - Accepts optional component overrides Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Removes markdown syntax without parsing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Remove duplicated component definitions from renderSimple.tsx - Allow extended md Paragraph with additional classes - Update AppModalContents to pass overrides explicitly
| * @param text - Text with markdown syntax | ||
| * @returns Plain text with markdown markers removed | ||
| */ | ||
| export function stripMarkdown(text: string): string { |
There was a problem hiding this comment.
@pettinarip As an alternative to this, we could use remove-markdown (runtime dependency) which is what we use on the blog to clean up the preview text for the posts. It's fairly small and a bit more robust but also potentially overkill for what we need here. Let me know if you think we should switch.
There was a problem hiding this comment.
Trimmed this down to just compile basic markdown strings using our existing htmlElements as the default component styling. When consumed, we can pass custom overrides, which in this case for the App Modal I've just overridden the heading levels to prevent any semantic html issues, and hidden any potential img tags for simplicity.
@pettinarip Could also just move this inside compile.ts as well, and maybe rename to compileSimple (similar function to compile just without the locale/scope/slugArray handling, and doesn't deal with front matter).

Extends
page-developer-appsbranchDescription
For
/developers/apps/pagesFixes:
To this:
Fixes:
To this: