Skip to content

Commit

Permalink
Inline ALL regexes (#1716)
Browse files Browse the repository at this point in the history
This fixes that only the first regex of the form `/regex/.source` was inlined.

(I forgot the `g` flag...)
  • Loading branch information
RunDevelopment authored and mAAdhaTTah committed Jan 24, 2019
1 parent bc49c36 commit 217a6ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var gulp = require('gulp'),

inlineRegexSource = function () {
return replace(
/\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/,
/\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g,
function (m, source) {
// escape backslashes
source = source.replace(/\\/g, '\\\\');
Expand Down

0 comments on commit 217a6ea

Please sign in to comment.