Skip to content

Fix hashtags incorrectly detected inside URLs#692

Open
5t34k wants to merge 1 commit intopermissionlesstech:mainfrom
5t34k:fix/hashtag-url-overlap
Open

Fix hashtags incorrectly detected inside URLs#692
5t34k wants to merge 1 commit intopermissionlesstech:mainfrom
5t34k:fix/hashtag-url-overlap

Conversation

@5t34k
Copy link
Copy Markdown

@5t34k 5t34k commented Apr 8, 2026

Description

When a URL contains a # fragment (e.g. https://example.com/page#section), the hashtag regex matches the fragment as a hashtag. The overlap removal logic already removes hashtags overlapping geohashes, and geohashes overlapping URLs, but did not remove hashtags overlapping URLs. Add the missing overlapsUrl check to the hashtag condition.

Fix

Add || overlapsUrl to the hashtag condition in ChatUIUtils.kt so hashtags inside URLs are filtered out.

How to reproduce

Send a message containing a URL with a fragment, e.g. https://example.com/page#section. The word "section" incorrectly appears as a hashtag.

Checklist

When a URL contains a # fragment (e.g. https://example.com/page#section),
the hashtag regex matches the fragment as a hashtag. The overlap removal
logic already removes hashtags overlapping geohashes, and geohashes
overlapping URLs, but did not remove hashtags overlapping URLs. Add the
missing overlapsUrl check to the hashtag condition.
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