Skip to content

Commit

Permalink
chore: exclude underscore from TS key enum rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan-Saini committed Feb 3, 2022
1 parent 7b2a33f commit c8c9cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/typescript/renderers/EnumRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ${this.indent(this.renderBlock(content, 2))}
break;
}
default: {
key = FormatHelpers.replaceSpecialCharacters(String(value), { exclude: [' '], separator: '_' });
key = FormatHelpers.replaceSpecialCharacters(String(value), { exclude: ['_'], separator: '_' });
//Ensure no special char can be the beginning letter
if (!(/^[a-zA-Z]+$/).test(key.charAt(0))) {
key = `String_${key}`;
Expand Down

0 comments on commit c8c9cec

Please sign in to comment.