Skip to content

Commit

Permalink
prefer String.prototype.replaceAll in the script to generate proble…
Browse files Browse the repository at this point in the history
…m matcher
  • Loading branch information
rhysd committed Feb 29, 2024
1 parent 9c40545 commit ed000f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/generate-actionlint-matcher/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MESSAGE = '.+?';
const KIND = '.+?';

let regexp = '^E?(F)E*:E*(L)E*:E*(C)E*: E*(M)E* \\[(K)\\]$';
regexp = regexp.replace(/E/g, ESCAPE); // replaceAll is not available in node v14
regexp = regexp.replaceAll('E', ESCAPE);
regexp = regexp.replace('F', FILEPATH);
regexp = regexp.replace('L', LINE);
regexp = regexp.replace('C', COL);
Expand Down

0 comments on commit ed000f9

Please sign in to comment.