You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't use an equals sign "=" in a serverless.yml variable default #5136
Interestingly, the regular expression used to detect constant strings, has a \1 reference in it, unlike all other regular expressions.
I wonder if this has something to do with it. If not used properly, it can cause weird side-effects. For example:
conststringRefSyntax=RegExp(/(?:('|").*?\1)/g);stringRefSyntax.exec('"this is fine"');// [""this is fine"", """, index: 0, input: ""this is fine"", groups: undefined]stringRefSyntax.exec('"this is fine"');// same string! 2nd execution// null
It may well be unrelated, but maybe it'll trigger an "aha" for someone :)
I am no regex guru, but is the regex even the issue? Putting that regex into an online regex tester and "this=not_fine", shows that it matches the whole string... I would assume then that the regex isn't the problem?
Activity
ronkorving commentedon Jul 24, 2018
Interestingly, the regular expression used to detect constant strings, has a
\1reference in it, unlike all other regular expressions.I wonder if this has something to do with it. If not used properly, it can cause weird side-effects. For example:
It may well be unrelated, but maybe it'll trigger an "aha" for someone :)
mscharp commentedon Nov 13, 2018
Has anyone taken a look at this? Anyway to get this fix prioritized?
reproduce serverless/serverless#5136
dschep commentedon Nov 13, 2018
Confirmed the bug in dschep-bug-repos/sls-5136, and even tried a few work arounds in hopes of a quick temporary fix, but to no avail 😢
The regex using
\1makes sense AFAICT because you want a string starting with'to end with'and similarly for".mscharp commentedon Nov 13, 2018
I am no regex guru, but is the regex even the issue? Putting that regex into an online regex tester and "this=not_fine", shows that it matches the whole string... I would assume then that the regex isn't the problem?
edited for spelling...
dschep commentedon Nov 13, 2018
Agreed, @mscharp. Just addressing @ronkorving's thought about it.
medikoo commentedon Mar 3, 2021
Fixed with #8987