Skip to content

Commit

Permalink
Match less punctuation in hashtags
Browse files Browse the repository at this point in the history
(closes #4303)
  • Loading branch information
bhousel committed Sep 11, 2017
1 parent 0d35c5e commit 9719a31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ui/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export function uiCommit(context) {

// Extract hashtags from `comment`
function commentTags() {
return tags.comment.match(/#[^\s\#]+/g);
return tags.comment.match(/#[\w-]+/g);
}

// Extract and clean hashtags from `hashtags`
Expand All @@ -293,7 +293,7 @@ export function uiCommit(context) {
.split(/[,;\s]+/)
.map(function (s) {
if (s[0] !== '#') { s = '#' + s; } // prepend '#'
var matched = s.match(/#[^\s\#]+/g); // match valid hashtags
var matched = s.match(/#[\w-]+/g); // match valid hashtags
return matched && matched[0];
}).filter(Boolean); // exclude falsey
}
Expand Down

0 comments on commit 9719a31

Please sign in to comment.