Skip to content

Commit

Permalink
fix: fix shortcut pattern with hypen (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
chabou authored Oct 4, 2021
1 parent 6564ad8 commit 48688f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ async function run(): Promise<void> {
*/

function extractStoryIds(content: string): string[] {
const regex = /(?<=(sc|ch))\d{1,7}/g
// Matching ch42, sc42 and sc-42 pattern
const regex = /((?<=(sc|ch))|(?<=(sc-)))\d{1,7}/g
const all = content.match(regex)
const unique = [...new Set(all)]
return unique
Expand Down

0 comments on commit 48688f9

Please sign in to comment.