Skip to content

Commit

Permalink
added support for '-' and '.' but both not as the first as first char…
Browse files Browse the repository at this point in the history
…acter
  • Loading branch information
oni303 committed Feb 27, 2014
1 parent 2757691 commit 3be6eb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/processing/app/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -2063,9 +2063,10 @@ static public String sanitizeName(String origName) {
for (int i = 0; i < c.length; i++) {
if (((c[i] >= '0') && (c[i] <= '9')) ||
((c[i] >= 'a') && (c[i] <= 'z')) ||
((c[i] >= 'A') && (c[i] <= 'Z'))) {
((c[i] >= 'A') && (c[i] <= 'Z')) ||
((i > 0) && (c[i] == '-')) ||
((i > 0) && (c[i] == '.'))) {
buffer.append(c[i]);

} else {
buffer.append('_');
}
Expand Down

0 comments on commit 3be6eb8

Please sign in to comment.