Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec fails if parameter string contains a comma (,) #17

Open
gchiappe opened this issue Apr 9, 2019 · 0 comments
Open

exec fails if parameter string contains a comma (,) #17

gchiappe opened this issue Apr 9, 2019 · 0 comments

Comments

@gchiappe
Copy link

gchiappe commented Apr 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant