Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hashtags being split by ZWNJ character #11821

Merged
merged 1 commit into from Sep 13, 2019
Merged

Fix hashtags being split by ZWNJ character #11821

merged 1 commit into from Sep 13, 2019

Conversation

@Gargron
Copy link
Member

Gargron commented Sep 13, 2019

Fix #11761

@ykzts
ykzts approved these changes Sep 13, 2019
@ThibG
ThibG approved these changes Sep 13, 2019
@@ -25,8 +25,9 @@ class Tag < ApplicationRecord
has_many :featured_tags, dependent: :destroy, inverse_of: :tag
has_one :account_tag_stat, dependent: :destroy

HASHTAG_NAME_RE = '([[:word:]_][[:word:]_·]*[[:alpha:]_·][[:word:]_·]*[[:word:]_])|([[:word:]_]*[[:alpha:]][[:word:]_]*)'
HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i
HASHTAG_SEPARATORS = "_\u00B7\u200c"

This comment has been minimized.

Copy link
@ThibG

ThibG Sep 13, 2019

Collaborator

I think the · would be more obvious written as is, but otherwise ok

@Gargron Gargron merged commit 0762258 into master Sep 13, 2019
2 checks passed
2 checks passed
build-and-test Workflow: build-and-test
Details
codeclimate All good!
Details
@Gargron Gargron deleted the fix-zwnj-hashtags branch Sep 13, 2019
hiyuki2578 added a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
katsusuke added a commit to katsusuke/mastodon that referenced this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.