fix underscore to handle spaces (#6637)

This commit is contained in:
wing328
2017-10-09 09:28:31 +08:00
committed by GitHub
parent 81e0357561
commit 164f5bbb72
2 changed files with 14 additions and 0 deletions

View File

@@ -3035,6 +3035,8 @@ public class DefaultCodegen {
word = word.replaceAll(firstPattern, replacementPattern);
word = word.replaceAll(secondPattern, replacementPattern);
word = word.replace('-', '_');
// replace space with underscore
word = word.replace(' ', '_');
word = word.toLowerCase();
return word;
}