Skip to content

Fix hashtags being split by ZWNJ character - #11821

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

Gargron merged 1 commit into
masterfrom
fix-zwnj-hashtags

Conversation

@Gargron

@Gargron Gargron commented Sep 13, 2019

Copy link
Copy Markdown
Member

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

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