Exclude trailing punctuation from linkified URLs in the timeline
iamnbutler opened ·
A sent message containing `https://github.com/githubnext/ace2/issues/91: attach images…` renders a link to `https://github.com/githubnext/ace2/issues/91:`, including the colon. Following the link opens the wrong URL.
## Cause
The timeline parses message text with comark (`packages/ui/src/components/blocks/parse.ts`), whose autolinking keeps a trailing colon:
``` "Implement https://github.com/githubnext/ace2/issues/91: attach" -> ["a",{"href":"https://github.com/githubnext/ace2/issues/91:"},"https://github.com/githubnext/ace2/issues/91:"] ```
## Expected
Trailing sentence punctuation (`:`, `.`, `,`, `;`, `!`, `?`, and unbalanced closing brackets) after a bare URL stays outside the link, as in GitHub and other chat apps.
Observed while dogfooding #91 in Ace Canary 0.0.11. Part of #5.
iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub
iamnbutlerparent-issue-addedlast month on GitHub
iamnbutlerreferenced this in feat(ui): attach images pasted into the composer #104last month on GitHub
iamnbutlerreferenced this in Long chat messages clip their final rendered line #168last month on GitHub