Change hashtag detection regex to disregard non-tags.
Summary
A hashtag in the URL within a post will count as one of the 5 permitted hashtags.
Steps to reproduce
- Create a post
- Insert a link with a hashtag in its URL
- Try creating 5 hashtags for that post
- Error appears
Relevant logs and/or screenshots
added scoped labels
added scoped label
added scoped label and automatically removed label
added scoped label
changed due date to January 28, 2020
changed milestone to %Sprint::01/15 - Youthful Yabby
assigned to @benhayward.ben
changed weight to 6
added scoped label and automatically removed label
added scoped label
changed weight to 4
changed milestone to %Sprint:01/29 Abatic Aenome
added scoped label and automatically removed label
Please ignore all tags that are all digits, like: #1 (closed) #2 #3 (closed) #4 (closed) #666 (closed) #2020 .
Or maybe ignore all tags that are 3 or less digits.
changed title from to
- Developer
I think we may need to rework the regex a little. I think it should looking for a space, followed by a hashtag.
I don't think that we can ignore the number ones though because some users may want to use numbers in a valid way for hashtags that have a meaning beyond the number (e.g. #911 (closed), #420 (closed), #666 (closed) or whatever). Maybe there's an argument that there should be more than one character following the tag though.
@ottman @jotto141 could you please give your thoughts on what the correct behavior here should be?
You may want to look for a line break in front of the # too. And check if it's the first character in the post as well.
- Owner
I agree there should be more than one character following the tag (though autocomplete should immediately display). Also the URL hashtags shouldn't come into play.
Note: We need to make Enter work to select the hashtag from autocomplete.
added scoped label and automatically removed label
mentioned in commit 23383abd
mentioned in merge request !751 (closed)
added scoped label and automatically removed label
added scoped label and automatically removed label
mentioned in merge request !762 (closed)
added scoped label and automatically removed label
added scoped label and automatically removed label
mentioned in merge request !772
added 4h of time spent at 2020-02-07
added scoped label and automatically removed label
added scoped label and automatically removed label
added scoped label and automatically removed label
added scoped label and automatically removed label
assigned to @edgebal
added scoped label and automatically removed label
- Developer
There are some issues with parsing. Check MR.
cc/ @benhayward.ben