Skip to content

Fix hashtags being split by ZWNJ character#11821

Merged
Gargron merged 1 commit intomasterfrom
fix-zwnj-hashtags
Sep 13, 2019
Merged

Fix hashtags being split by ZWNJ character#11821
Gargron merged 1 commit intomasterfrom
fix-zwnj-hashtags

Conversation

@Gargron
Copy link
Copy Markdown
Member

@Gargron Gargron commented Sep 13, 2019

Fix #11761

Comment thread app/models/tag.rb

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Gargron Gargron merged commit 0762258 into master Sep 13, 2019
@Gargron Gargron deleted the fix-zwnj-hashtags branch September 13, 2019 14:01
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZWNJ is not supported in hashtags

3 participants