gulp-preprocess
gulp-preprocess copied to clipboard
exec fails if parameter string contains a comma (,)
This is my preprocess function:
.pipe(preproc({ context: {
LOG: (themsg) => { return "console.log(`[DEBUG] " + themsg + "`);" }
}}))
And this my source file:
// @exec LOG('Seguimiento2 versión ${this.VERSION} ©2019 GCA')
In browser, it should print in console:
[DEBUG] Seguimiento2 versión 2.0.1 ©2019 GCA
But when I add a comma like this:
// @exec LOG('Seguimiento2 , versión ${this.VERSION} ©2019 GCA')
Then the console output is the following:
[DEBUG] undefined
I think something is wrong with the @exec regex.
Also I think the bug is present in parent project jsoverson/preprocess.