From 67057d0494dc76a5a72ce1c3a837429f53c55fc6 Mon Sep 17 00:00:00 2001 From: Sam Beveridge Date: Fri, 29 Nov 2019 16:01:02 -0800 Subject: [PATCH] added underscore to acceptable characters in path --- src/serializer.ts | 2 +- test/features/Serializer.feature | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/serializer.ts b/src/serializer.ts index 42c8208..525d311 100644 --- a/src/serializer.ts +++ b/src/serializer.ts @@ -8,7 +8,7 @@ export function escapeString(name:string){ /\s/.test(name) || ["null", "false", "true"].includes(name) || /^\d/.test(name) - || !(/^[a-zA-Z().]+$/.test(name)) + || !(/^[a-zA-Z()._]+$/.test(name)) ) { return "`" + name + "`"; } diff --git a/test/features/Serializer.feature b/test/features/Serializer.feature index a23f8bc..9a3e926 100644 --- a/test/features/Serializer.feature +++ b/test/features/Serializer.feature @@ -62,5 +62,6 @@ Feature: AST Serializer | `foo*bar` | | `foobar-1` | | foo.bar.baz | + | foo.foo_bar |