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

Add g flag to pattern string by default #6

Closed
azu opened this issue Feb 13, 2018 · 1 comment · Fixed by #7
Closed

Add g flag to pattern string by default #6

azu opened this issue Feb 13, 2018 · 1 comment · Fixed by #7

Comments

@azu
Copy link
Member

azu commented Feb 13, 2018

Should we add g flag to pattern string?

For example, following pattern string is treaded /#.*{#[a-z.-]+}/ .
As a result, this pattern match only first item({#first}).
By constrast it does not match second item({#second})

pattern:

"/#.*{#[a-z.-]+}/"

text:

# First {#first}

# Second {#second}

Current behavior confuse user, I think.

@azu azu changed the title Add g flag to Pattern string by default Add g flag to pattern string by default Feb 13, 2018
@azu
Copy link
Member Author

azu commented Feb 13, 2018

If pass /pattern/, add g flag to the pattern automatically.
If pass /pattern/g, do noting.

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

Successfully merging a pull request may close this issue.

1 participant