Skip to content

Commit

Permalink
fix: escaping regex
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jul 31, 2019
1 parent e1726fc commit e1bea79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/success.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function getTickets(config: PluginConfig, context: GenerateNotesContext): string
let patterns: RegExp[] = [];

if(config.ticketRegex) {
patterns = [new RegExp(config.ticketRegex, 'giu')];
patterns = [new RegExp(escapeRegExp(config.ticketRegex), 'giu')];
} else {
patterns = config.ticketPrefixes!
.map(prefix => new RegExp(`\\b${escapeRegExp(prefix)}-(\\d+)\\b`, 'giu'));
Expand Down

0 comments on commit e1bea79

Please sign in to comment.