Moved markdown parsing logic to a separate util file#20526
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves code cleanliness and maintainability by centralizing the markdown parsing logic into a new, separate utility file. This refactoring ensures that rendering components are decoupled from the parsing implementation, making the codebase easier to understand, test, and extend. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the markdown parsing logic into a dedicated utility file, markdownParsingUtils.ts. This change significantly improves code cleanliness and separation of concerns, making the InlineMarkdownRenderer.tsx and TableRenderer.tsx components more focused on rendering rather than parsing. The move of the parseMarkdownToANSI function and its associated helpers and constants to a new file enhances maintainability and reusability of the markdown parsing logic. The updated import paths in the affected files and the test file correctly reflect this change. The new file includes the required license header, adhering to the repository's conventions.
|
Size Change: +52 B (0%) Total Size: 25.7 MB ℹ️ View Unchanged
|

Summary
Moved markdown parsing logic into a separate utility file.
Details
This is to maintain code cleanliness and keep the utilities separate from the rendering logic.
Related Issues
Closes #20061
How to Validate
Run
npm test -w @google/gemini-cli -- src/ui/utils/markdownParsingUtils.test.ts. The tests should all pass.Pre-Merge Checklist