From 30ef9fccf0c603ba917191ddbefdd497523d3d67 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 6 May 2024 14:47:19 +0200 Subject: [PATCH] Fix hashtag matching pattern matching some link anchors (#30190) --- 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 35be921e2d..3f88cb0680 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{(?