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

feat(prefixRegex): add _ regex support #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

townmi
Copy link

@townmi townmi commented Sep 30, 2020

some time globalsPrefix not use hyphen, like react-modal. they use underline.

@constgen
Copy link
Contributor

It is easy to confuse 'app' and 'application' in a such case. Better replace the dash with \b expression that means the end of the word with any delimiter or the end or start of the string. Which means that it should not be a substring of the word. I feel that we start to need unit tests

@townmi townmi changed the title feat(regex): remove hyphen from regex feat(prefixRegex): add _ regex support Oct 9, 2020
@townmi
Copy link
Author

townmi commented Oct 9, 2020

@constgen thank you for find my mistake, but underline can't match by \b expression in javascript, so I add [-|_] for support underline.

@constgen
Copy link
Contributor

constgen commented Oct 9, 2020

Ok. Lets not confuse [-|_] and (-|_)

  • [-|_] finds -, |, _ symbols
  • (-|_) finds - or _

So what is expected?

@townmi
Copy link
Author

townmi commented Oct 9, 2020

@constgen I confused [] and (), thanks , my mistake. I will remove | and use [-_]

@constgen
Copy link
Contributor

constgen commented Oct 9, 2020

Now it looks ok. But unfortunately I have no rights to merge these changes. I am not a collaborator of this project. Lets hope @nairinarinyan will respond quickly. Or may be will make me a core maintainer? ))

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

Successfully merging this pull request may close these issues.

2 participants