Skip to content

Commit 3be6eb8

Browse files
committed
added support for '-' and '.' but both not as the first as first character
1 parent 2757691 commit 3be6eb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/processing/app/Sketch.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -2063,9 +2063,10 @@ static public String sanitizeName(String origName) {
20632063
for (int i = 0; i < c.length; i++) {
20642064
if (((c[i] >= '0') && (c[i] <= '9')) ||
20652065
((c[i] >= 'a') && (c[i] <= 'z')) ||
2066-
((c[i] >= 'A') && (c[i] <= 'Z'))) {
2066+
((c[i] >= 'A') && (c[i] <= 'Z')) ||
2067+
((i > 0) && (c[i] == '-')) ||
2068+
((i > 0) && (c[i] == '.'))) {
20672069
buffer.append(c[i]);
2068-
20692070
} else {
20702071
buffer.append('_');
20712072
}

0 commit comments

Comments
 (0)