Skip to content

Fix regex anchor #69 #80

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

Merged
merged 5 commits into from
Feb 14, 2022
Merged

Fix regex anchor #69 #80

merged 5 commits into from
Feb 14, 2022

Conversation

chtenb
Copy link
Member

@chtenb chtenb commented Feb 8, 2022

Fix #69


Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

@jamesdbrock jamesdbrock self-requested a review February 11, 2022 00:10
Copy link
Member

@jamesdbrock jamesdbrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I just checked to confirm that

const re = /^(^(a))/;
'a'.match(re);

works in JavaScript and yes of course it does. I can't think of any other cases in which this might cause trouble.

@chtenb chtenb merged commit f1675fb into purescript-contrib:main Feb 14, 2022
@chtenb chtenb deleted the fix_regex_anchor branch February 14, 2022 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

regex should wrap regex in parens when prefixing with ^
2 participants