Skip to content

feat: linkExternalUrls to use GFM-style detection#1879

Merged
pedrolamas merged 2 commits into
fluidd-core:developfrom
pedrolamas:pedrolamas/gfm-link-detection
Jun 16, 2026
Merged

feat: linkExternalUrls to use GFM-style detection#1879
pedrolamas merged 2 commits into
fluidd-core:developfrom
pedrolamas:pedrolamas/gfm-link-detection

Conversation

@pedrolamas

Copy link
Copy Markdown
Member

Improves linkExternalUrls to use GFM-style URL detection so quotes and trailing punctuation are excluded from links, and added a test spec.

@pedrolamas pedrolamas added this to the 1.37.2 milestone Jun 16, 2026
@pedrolamas pedrolamas requested a review from Copilot June 16, 2026 09:55
@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Jun 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates linkExternalUrls (used to linkify warning/notification text rendered via v-safe-html) to follow more GitHub Flavored Markdown-like URL detection, avoiding inclusion of wrapping quotes and trailing punctuation in generated links.

Changes:

  • Tightened URL matching regex to exclude common wrapper characters.
  • Added trimUrl() to strip trailing punctuation and unmatched closing parentheses before linkifying.
  • Added a Vitest spec covering quotes, punctuation, parentheses, and multiple URLs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/util/link-external-urls.ts Reworks URL detection/linkification to trim GFM-style trailing punctuation and unmatched ) before generating anchors.
src/util/tests/link-external-urls.spec.ts Adds unit tests validating the new linkification behavior for common punctuation/parentheses cases.

Comment thread src/util/link-external-urls.ts
Comment thread src/util/__tests__/link-external-urls.spec.ts Outdated
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/util/__tests__/link-external-urls.spec.ts Outdated
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas merged commit 7c6e164 into fluidd-core:develop Jun 16, 2026
4 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/gfm-link-detection branch June 16, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FR - Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants