Skip to content

Commit

Permalink
Remove backreferences from message regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Koleda committed Nov 1, 2018
1 parent 6cfa4f5 commit 0d35cb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github/.gitignore
@@ -1,4 +1,4 @@
.DS_store/
.gasp.json
.clasp.json
dist
node_modules/
2 changes: 1 addition & 1 deletion github/src/MessageUtils.js
Expand Up @@ -58,7 +58,7 @@ function extractGitHubLinks(messageBodies) {
* @return {GitHubLink[]} extracted link information, empty array if none found.
*/
function extractGitHubLinksFromText_(text, appendTo) {
var re = /https:\/\/github.com\/(.+?)(?<!<)\/(?!>)(.+?)(?<!<)\/(?!>)(issues|pull)(?<!<)\/(?!>)(\d+)/gi;
var re = /https:\/\/github.com\/([^\/]+?)\/([^\/]+?)\/(issues|pull)\/(\d+)/gi;
while ((match = re.exec(text)) !== null) {
var type = stripHtmlTags(match[3]);
appendTo.push({
Expand Down

0 comments on commit 0d35cb5

Please sign in to comment.