Repository navigation
Conversation
The boundary check looked at the character before the whitespace that starts the mention pattern, so a mention after a word was rejected and the email autolinker made it a mailto link. Only check that character when the match doesn't start on whitespace, and keep the space the pattern consumed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mentions after a word (
of the !fallout@lemmy.world) weren't recognized, and the email autolinker turned the address into amailto:link. Mentions at the start of a line or after punctuation still worked, which is why it was easy to miss.#418 made the mention pattern start with the whitespace before the mention, but
tryMatchstill checked the character before that whitespace as the boundary, which is a letter after a word. The check now only applies when the match doesn't start on whitespace. The space the pattern consumes is also kept, so "of the" doesn't run into the mention.I checked it with unit tests (a mention after a word, at the start, after punctuation, and the spacing). They're in my fork, and I can add them here if you'd like, though the repo has no test setup yet.
Written with AI assistance (Claude Code) and reviewed by me.
🤖 Generated with Claude Code