1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00

Sketch names starting with a digit are now allowed

Fix #6592
This commit is contained in:
Cristian Maglie 2017-08-18 15:11:24 +02:00
parent 495c29c44b
commit 4545283ae7
3 changed files with 2 additions and 6 deletions

View File

@ -826,8 +826,7 @@ public class SketchController {
if (!newName.equals(origName)) {
String msg =
tr("The sketch name had to be modified. Sketch names can only consist\n" +
"of ASCII characters and numbers (but cannot start with a number).\n" +
"They should also be less than 64 characters long.");
"of ASCII characters and numbers and be less than 64 characters long.");
System.out.println(msg);
}
return newName;

View File

@ -873,10 +873,6 @@ public class BaseNoGui {
char c[] = origName.toCharArray();
StringBuffer buffer = new StringBuffer();
// can't lead with a digit, so start with an underscore
if ((c[0] >= '0') && (c[0] <= '9')) {
buffer.append('_');
}
for (int i = 0; i < c.length; i++) {
if (((c[i] >= '0') && (c[i] <= '9')) ||
((c[i] >= 'a') && (c[i] <= 'z')) ||

View File

@ -10,6 +10,7 @@ ARDUINO 1.8.4
* Make Preference window fit 600px height displays
* Fix error when renaming an unsaved, newly added file. Thanks @matthijskooijman
* Added the ability to increase/decrease font size via keyboard + mouse shortcuts (Ctrl + MouseWheel)
* Sketch names starting with a digit are now allowed
[libraries]
* Fixed wrong folder name for "Adafruit Circuit Playground" library, now it can be updated cleanly.