Skip to content

Commit 4545283

Browse files
committed
Sketch names starting with a digit are now allowed
Fix #6592
1 parent 495c29c commit 4545283

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

app/src/processing/app/SketchController.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,7 @@ private static String checkName(String origName) {
826826
if (!newName.equals(origName)) {
827827
String msg =
828828
tr("The sketch name had to be modified. Sketch names can only consist\n" +
829-
"of ASCII characters and numbers (but cannot start with a number).\n" +
830-
"They should also be less than 64 characters long.");
829+
"of ASCII characters and numbers and be less than 64 characters long.");
831830
System.out.println(msg);
832831
}
833832
return newName;

arduino-core/src/processing/app/BaseNoGui.java

-4
Original file line numberDiff line numberDiff line change
@@ -873,10 +873,6 @@ static public String sanitizeName(String origName) {
873873
char c[] = origName.toCharArray();
874874
StringBuffer buffer = new StringBuffer();
875875

876-
// can't lead with a digit, so start with an underscore
877-
if ((c[0] >= '0') && (c[0] <= '9')) {
878-
buffer.append('_');
879-
}
880876
for (int i = 0; i < c.length; i++) {
881877
if (((c[i] >= '0') && (c[i] <= '9')) ||
882878
((c[i] >= 'a') && (c[i] <= 'z')) ||

build/shared/revisions.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARDUINO 1.8.4
1010
* Make Preference window fit 600px height displays
1111
* Fix error when renaming an unsaved, newly added file. Thanks @matthijskooijman
1212
* Added the ability to increase/decrease font size via keyboard + mouse shortcuts (Ctrl + MouseWheel)
13+
* Sketch names starting with a digit are now allowed
1314

1415
[libraries]
1516
* Fixed wrong folder name for "Adafruit Circuit Playground" library, now it can be updated cleanly.

0 commit comments

Comments
 (0)