diff options
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index b8ac8fb5d..5e3e27a7c 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -41,7 +41,7 @@ export namespace Field { switch (typeof field) { case 'string': if (field.startsWith('{"')) return `'${field}'`; // bcz: hack ... want to quote the string the right way. if there are nested "'s, then use ' instead of ". In this case, test for the start of a JSON string of the format {"property": ... } and use outer 's instead of "s - return `"${field}"`; + return !field.includes('`') ? `\`${field}\`` : `"${field}"`; case 'number': case 'boolean': return String(field); |