-
Notifications
You must be signed in to change notification settings - Fork 223
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
Remove hash from hashtag list #1462
Conversation
Codecov Report
@@ Coverage Diff @@
## development #1462 +/- ##
=============================================
Coverage 9.02% 9.02%
Complexity 403 403
=============================================
Files 203 203
Lines 18086 18086
Branches 3325 3325
=============================================
Hits 1633 1633
Misses 16131 16131
Partials 322 322
Continue to review full report at Codecov.
|
@Achint08 @djmgit @hemantjadon @kavithaenair @SKrPl @vibhcool: Please review. |
@@ -57,7 +57,7 @@ | |||
// left boundary must be space since the @ is itself a boundary | |||
public final static Pattern USER_PATTERN = Pattern.compile("(?:[ (]|^)(@..*?)(?:\\b|$)"); | |||
// left boundary must be a space since the # is itself a boundary | |||
final static Pattern HASHTAG_PATTERN = Pattern.compile("(?:[ (]|^)(#..*?)(?:\\b|$)"); | |||
final static Pattern HASHTAG_PATTERN = Pattern.compile("(?:[ (]|^)#(..*?)(?:\\b|$)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any tests? Doesn't keeping the #
outside mandate that the hash is available in the pattern?
It'd always be better to have a test to pass and fail these patterns, that'd give a detailed reason as to why this change in regex is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sudheesh001 There isn't a bug in hashtags, the hashtags work fine, but Loklak Search team suggested that hashtags strings are more useful than hashtags with #
symbol. #1457 (comment)
EDIT: yes, we need to add more detailed tests 😅
Short description
Fixes #1457.
I have:
Fixes #<number> commit message
For the reviewers
I have: