Simplify regex a bit

This commit is contained in:
Ryan Cavanaugh
2015-11-12 13:37:03 -08:00
parent ea29793acd
commit f90ef92e7c

View File

@@ -1592,7 +1592,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
/// these emit into an object literal property name, we don't need to be worried
/// about keywords, just non-identifier characters
function emitAttributeName(name: Identifier) {
if (/^[A-Za-z_]+[\w]*$/.test(name.text)) {
if (/^[A-Za-z_]\w*$/.test(name.text)) {
emit(name);
}
else {