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
I see you have a regex there to qualify when a string is a single line. It's pretty simple, too.
Typically, formats have been for things that either can't be perfectly qualified by regex or are really complicated, like URIs.
Also, I wonder if the utility of this warrants a new format. Seems like maybe it would be better to include it in a listing of "common" expressions that can be used with the pattern keyword.
This should just be done with pattern, and if you want to name it, you can make a definition under definitions (current) or $defs (future). format is for things that have semantic meaning that isn't apparent from a regex (how many of us would recognize an email address regex if we saw one? they're absurdly complex if they're even useful at all).
This is very naive proposal but it makes sense for me, so why not for the spec...
format: singleline
pattern:
/^[^\n\r]*$/
The idea is to be able to tell when a string is supposed to not be a multiline string.
The text was updated successfully, but these errors were encountered: