Skip to content

Commit

Permalink
issue #24
Browse files Browse the repository at this point in the history
解决SVG文件名含有数字时,会被替换为下划线的问题,保持原来的数字
  • Loading branch information
Elaine666 authored May 15, 2019
1 parent 00783a4 commit 0951314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/moxun/s2v/utils/CommonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static String loadMetaInf(String key, String defValue) {
public static String getValidName(String s) {
char[] chars = s.toLowerCase().replaceAll("\\s*", "").toCharArray();
for (int i = 0; i < chars.length; i++) {
if (!Character.isLetter(chars[i])) {
if (!Character.isLetter(chars[i]) && !Character.isDigit(chars[i])) {
chars[i] = '_';
}
}
Expand Down

0 comments on commit 0951314

Please sign in to comment.