Skip to content

refactor: Extract markdown parsing to utility and fix regex greediness - #272

Merged
albertoivo merged 3 commits into
mainfrom
refactor-markdown-parser-13229913192782790059
Sep 5, 2026
Merged

refactor: Extract markdown parsing to utility and fix regex greediness#272
albertoivo merged 3 commits into
mainfrom
refactor-markdown-parser-13229913192782790059

Conversation

@albertoivo

Copy link
Copy Markdown
Owner

Extract markdown parsing logic from ArticlePage to a new utility file (src/utils/markdownParser.ts) to adhere to the Single Responsibility Principle and improve testability. Fixes a bug related to regex greediness for bold and italic text parsing when multiple elements are on the same line. Includes unit tests for the new utility function.


PR created automatically by Jules for task 13229913192782790059 started by @albertoivo

…iness

- Extracted Markdown content parsing to src/utils/markdownParser.ts
- Fixed greedy regex issue preventing parsing of multiple formatting elements on the same line
- Added tests for markdownParser.ts
- Updated ArticlePage to use the new utility

Co-authored-by: albertoivo <1276520+albertoivo@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit eccb63f):

https://pyexplorer-cd32d--pr272-refactor-markdown-pa-tuqjclr3.web.app

(expires Sat, 12 Sep 2026 10:59:40 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 916b4905e0cdc420f3368c8eb19b2f2e90c3be61

@albertoivo

Copy link
Copy Markdown
Owner Author

This is already in production.
When I merge to main, it will automatically go to production. So please make sure everything is ok.
I'm not training about to only run tests and lint.
I want you to look for possible bugs and inconsistencies in runtime.

@google-labs-jules

Copy link
Copy Markdown
Contributor

This is already in production.
When I merge to main, it will automatically go to production. So please make sure everything is ok.
I'm not training about to only run tests and lint.
I want you to look for possible bugs and inconsistencies in runtime.

Acknowledged. I understand this PR is meant to address bugs and runtime inconsistencies, not just pass linting and tests.

…iness

- Extracted Markdown content parsing to src/utils/markdownParser.ts
- Fixed greedy regex issue preventing parsing of multiple formatting elements on the same line
- Added tests for markdownParser.ts
- Updated ArticlePage to use the new utility

Co-authored-by: albertoivo <1276520+albertoivo@users.noreply.github.com>
@albertoivo

Copy link
Copy Markdown
Owner Author

Eu quero que reveja se esse código.
Procura por possíveis bugs e inconsistências.

…iness

- Extracted Markdown content parsing to src/utils/markdownParser.ts
- Fixed greedy regex issue preventing parsing of multiple formatting elements on the same line
- Fixed bug where `- ✅` checkmarks were being incorrectly parsed as regular lists
- Added tests for markdownParser.ts
- Updated ArticlePage to use the new utility

Co-authored-by: albertoivo <1276520+albertoivo@users.noreply.github.com>
@albertoivo
albertoivo merged commit 47de362 into main Sep 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant