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

options (gmi) are never applied #5

Closed
ed4becky opened this issue Oct 2, 2013 · 3 comments
Closed

options (gmi) are never applied #5

ed4becky opened this issue Oct 2, 2013 · 3 comments

Comments

@ed4becky
Copy link

ed4becky commented Oct 2, 2013

It looks like the options flags are never applied as part of the replace

@bomsy
Copy link
Owner

bomsy commented Oct 3, 2013

hi, do you have a quick example, that does not work?
Thanks

@ed4becky
Copy link
Author

ed4becky commented Oct 3, 2013

This action only applies the chnage to the first instance in a line:

{
search: /partials/logo.html/,
replace: 'p/m',
flags: 'g'
}

if I change to this it works:

{
search: /partials/logo.html/g,
replace: 'p/m'
}

On Thu, Oct 3, 2013 at 5:57 AM, Hubert Boma Manilla <
notifications@github.com> wrote:

hi, do you have a quick example, that does not work?
Thanks


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-25610015
.

@bomsy
Copy link
Owner

bomsy commented Nov 21, 2013

When using a Regexp object like /\s+/g the options must be attached as part of the object. So the flags option is not needed.
Cheers

@bomsy bomsy closed this as completed May 15, 2014
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

2 participants