-
-
Notifications
You must be signed in to change notification settings - Fork 294
Refactoring StyledMarkdown.tsx #1788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1788 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 633 633
Branches 196 196
=========================================
Hits 633 633 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
This reverts commit 0dc64a6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. Good job with the refactoring Idan. This PR reflects really well the primary goal of the GSoC project.
What kind of change does this PR introduce?
Restructure the component for better modularity Split StyledMarkdown.tsx (709 lines) into 4 focused modules:
lib/markdownUtils.ts
- Utility functions, regex constants, and helper typescomponents/TabsGroup.tsx
- Standalone tabs component with switching logiccomponents/TableOfContentMarkdown.tsx
- TOC rendering with heading depth controlscomponents/StyledMarkdownBlock.tsx
- Core markdown rendering with all overridescomponents/StyledMarkdown.tsx
- Main orchestrator (reduced to 71 lines)Issue Number:
StyledMarkdown.tsx
for Modular Markdown Rendering #1659Screenshots/videos:
Summary
Does this PR introduce a breaking change?
no
Checklist
Please ensure the following tasks are completed before submitting this pull request.