From 173bc3e4e0efcd632b910bb0ba18a9a6f62aa8d4 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 6 May 2024 14:23:52 +0200 Subject: [PATCH] Fix hashtag matching pattern matching some link anchors Fixes #30182 --- app/models/tag.rb | 2 +- spec/models/tag_spec.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/tag.rb b/app/models/tag.rb index 35be921e2d0..3f88cb06807 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -37,7 +37,7 @@ class Tag < ApplicationRecord HASHTAG_LAST_SEQUENCE = '([[:word:]_]*[[:alpha:]][[:word:]_]*)' HASHTAG_NAME_PAT = "#{HASHTAG_FIRST_SEQUENCE}|#{HASHTAG_LAST_SEQUENCE}" - HASHTAG_RE = %r{(?