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

Treat punctuation as hashtag delimiters #4419

Merged
merged 1 commit into from
Oct 9, 2017

Conversation

mojodna
Copy link
Collaborator

@mojodna mojodna commented Oct 9, 2017

Unicode ranges for punctuation are simpler than creating a Unicode-aware word class, so delimit on non-words.

Fixes #4398

Unicode ranges for punctuation are simpler than creating a Unicode-aware
word class, so delimit on non-words.

Fixes openstreetmap#4398
@bhousel bhousel merged commit e399112 into openstreetmap:master Oct 9, 2017
@bhousel
Copy link
Member

bhousel commented Oct 9, 2017

Thanks @mojodna! Looks pretty good.. I merged it and then made 2 other little changes in 8f82caf:

  • I removed the _, so hashtags can have underscores in them
  • I changed the quantifier from * to + so it would match 1 or more instead of 0 or more. The original would detect a single lonely "#" character, even in cases where the hashtags string was empty.

@mojodna mojodna deleted the hashtag-regex branch October 9, 2017 18:57
@mojodna
Copy link
Collaborator Author

mojodna commented Oct 9, 2017

Thanks. I was being spacey when I put that together; too much of a hurry

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.

2 participants