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
The patter attribute needs to be a string. However, some editors (like in a brand new VSCode) will automatically detect "unnecessary" scapes in strings and remove them, making it harder to send those as strings.
For instance, this ^[:alnum:]+\@[:alnum:\.]\:(\/[:alnum:]+)*$ will be saved as ^[:alnum:]+@[:alnum:.]:(/[:alnum:]+)*$ automatically.
As a workaround, we can do something like /^[:alnum:]+\@[:alnum:\.]\:(\/[:alnum:]+)*$/.toString() and then remove the first and last /, but it would be nice if we can send the regular expression from the beginning.
If . is supposed to be a dot (and not any char), ^[:alnum:]+@[:alnum:\.]:(/[:alnum:]+)*$ should be encoded as "^[:alnum:]+@[:alnum:\\.]:(/[:alnum:]+)*$" as a string, for example.
Summary
The
patter
attribute needs to be astring
. However, some editors (like in a brand new VSCode) will automatically detect "unnecessary" scapes in strings and remove them, making it harder to send those as strings.For instance, this
^[:alnum:]+\@[:alnum:\.]\:(\/[:alnum:]+)*$
will be saved as^[:alnum:]+@[:alnum:.]:(/[:alnum:]+)*$
automatically.As a workaround, we can do something like
/^[:alnum:]+\@[:alnum:\.]\:(\/[:alnum:]+)*$/.toString()
and then remove the first and last/
, but it would be nice if we can send the regular expression from the beginning.schemasafe/src/compile.js
Line 481 in 3f4dc5f
The text was updated successfully, but these errors were encountered: