0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/frontend/discourse-markdown-it
Régis Hanol f6954ad792
FIX: Prevent URL anchors from triggering hashtag autocomplete in rich editor (#37306)
When typing a URL with an anchor that matches an existing tag (e.g.,
`discourse.org/#music` where `music` is a tag), the hashtag autocomplete
would incorrectly appear and could convert the anchor into a hashtag
node.

This fix addresses the issue with two complementary changes:

1. Remove `/` from the allowed preceding characters for autocomplete
triggers, preventing `/#` sequences from initiating autocomplete

2. Add `inLink()` checks in both the autocomplete trigger rule and the
hashtag input rule to skip hashtag processing when the cursor is inside
a link mark

Ref - t/172925
2026-01-29 09:42:33 +01:00
..
src FIX: Prevent URL anchors from triggering hashtag autocomplete in rich editor (#37306) 2026-01-29 09:42:33 +01:00
addon-main.cjs
package.json DEV: Upgrade to pnpm v10 (#36289) 2026-01-12 10:43:06 +00:00