Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 6, 2025

Description

Addresses feedback from PR #3000 review comment #discussion_r2594633088 regarding the convertImagePathsToGitHub regex implementation.

Changes

  • Consolidated regex patterns: Replaced three separate regex patterns with a single robust pattern that handles all path types (relative, absolute, direct)
  • File extension validation: Only converts paths ending with valid image extensions (png, jpg, jpeg, gif, svg, webp, bmp, tiff, ico)
  • Edge case handling:
    • Escaped brackets in alt text: ![Alt \[text\]](images/file.png)
    • Parentheses in paths: ![Alt](images/diagram(v2).png)
    • Title attributes: ![Alt](images/file.png "title")
  • Comprehensive test coverage: Added 6 new tests covering all edge cases and validation scenarios
  • Documentation: Added detailed inline comments explaining each regex component

Checklist


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Dec 6, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 6, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits December 6, 2025 07:50
Co-authored-by: sacOO7 <16723785+sacOO7@users.noreply.github.com>
Co-authored-by: sacOO7 <16723785+sacOO7@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 6, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • unpkg.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node scripts/postinstall.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] WIP address feedback on MDX transpilation implementation Fix image path regex to handle edge cases and validate extensions Dec 6, 2025
Copilot AI requested a review from sacOO7 December 6, 2025 07:54
@sacOO7
Copy link
Contributor

sacOO7 commented Dec 8, 2025

Separate PR is not needed, but it's good for reference 👍

@sacOO7 sacOO7 closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants