From 893c46362ec1e07b4b36ee1ea5929be2fa495a02 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 10 Apr 2024 17:53:27 +0200 Subject: [PATCH] revert change --- src/parsers/ParserEngines.ts | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/parsers/ParserEngines.ts b/src/parsers/ParserEngines.ts index 69b6f5b2..39d226ab 100644 --- a/src/parsers/ParserEngines.ts +++ b/src/parsers/ParserEngines.ts @@ -45,26 +45,7 @@ export const Engines = { }, yaml: { parse: (value: string) => { - const lines = value.split('\n'); - // Check if a line includes a colon and isn't wrapped in quotes, we need to add quotes to the value - for (const line of lines) { - const parts = line.split(':'); - if (parts.length > 2) { - const key = parts[0].trim(); - const value = parts.slice(1).join(':').trim(); - - if ( - !value.startsWith('"') && - !value.endsWith('"') && - !value.includes("'") && - !value.includes('"') - ) { - lines[lines.indexOf(line)] = `${key}: "${value}"`; - } - } - } - - return yaml.parse(removeCarriageReturn(lines.join('\n'))); + return yaml.parse(removeCarriageReturn(value)); }, stringify: ( obj: any,