-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hotfix for module named like "is-function" #3
base: master
Are you sure you want to change the base?
Conversation
Without this, "can-util/js/is-function/is-function" stops short at "can-util/js/is-function"
Will fix the broken On that page -> https://canjs.com/doc/can-util.html |
@leoj3n, could you please add a test for this change? |
@chasenlehara Seems my new regex pattern is causing an existing test to fail because of how it includes one character behind so where a name like So, this assertion is failing: Because this if statement is now matching I think that if statement adds back I had to write the regex the way I did because JavaScript regex doesn't support look behind. Not sure if the token now being like These reasons are why in the OP that I said I wasn't so sure about the proper way to resolve the issue of having a "name" string with "function" in it like |
Hm, it seems we could maybe piggy-back off this hack: Which means users will have to use @module {function} can-util/js/is-f\\unction/is-f\\unction is-function |
Update: Eventually this will be resolved by https://github.com/canjs/can-parse For now, ignore the issue. |
New "function" regex:
https://regex101.com/r/jL1iW6/8/tests
Without this, "can-util/js/is-function/is-function" stops short at "can-util/js/is-function":
With new
(?:[^\-]|^)function
regex:@justinbmeyer Is there a better solution? Feels like a temporary fix; but best I could come up with.