Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close mozilla-mobile#12623: Do not match issue ID if preceded by othe…
…r characters To avoid matching against issues in other repositories, we can reduce our matches to not include values if they are preceded by 1 or more string/number/hypen/underscore values. Tested using: - a JS console: ```javascript const issueRegExp = new RegExp("(?<![A-Za-z\\-\\_]+)#(\\d+)+", "g"); const numMatches = Array.from(issueRegExp[Symbol.matchAll]("mozilla-mobile#12345")).length const numMatches2 = Array.from(issueRegExp[Symbol.matchAll](" mozilla-mobile#12345 ")).length assert(numMatches == 0); assert(numMatches2 == 1); ``` - regex tester: https://regexr.com/6rg2v
- Loading branch information