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 sketch "{0}" cannot be used.\nSketch names must contain only basic letters and numbers\n(ASCII-only with no spaces, and it cannot start with a number).\nTo get rid of this message, remove the sketch from\n{1}',
* `undefined` if the candidate sketch name is valid. Otherwise, the validation error message.
171
+
* Based on how https://create.arduino.cc/editor/ works.
172
+
*/
173
+
exportfunctionvalidateCloudSketchFolderName(
174
+
candidate: string
175
+
): string|undefined{
176
+
return/^[0-9a-zA-Z_]{1,36}$/.test(candidate)
177
+
? undefined
178
+
: invalidCloudSketchFolderNameMessage;
179
+
}
180
+
181
+
/**
182
+
* Transforms the valid local sketch name into a valid cloud sketch name by replacing dots and dashes with underscore and trimming the length after 36 characters.
0 commit comments