From 8a1ea6f02931669dd8303f081935d756f352f2da Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Mon, 22 May 2023 22:34:36 -0600 Subject: [PATCH] Fixed error with output --- src/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index 57b24e5d..ebfe0ce1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -652,6 +652,10 @@ export const jsonOutput = ({ if (typeof value === 'string') { // if escape is true, escape quotes and backslashes return escape ? value.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : value + } else if (Array.isArray(value)) { + return escape + ? value.map(v => v.replace(/\\/g, '\\\\').replace(/"/g, '\\"')) + : value } return value })