From 21b04a17fe649377c76df657b033f49f1e700e70 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 9 Jul 2024 09:32:57 +0200 Subject: [PATCH] Fixes #922 --- plug-api/lib/attribute.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plug-api/lib/attribute.ts b/plug-api/lib/attribute.ts index 61fc1b01..8b4d0f53 100644 --- a/plug-api/lib/attribute.ts +++ b/plug-api/lib/attribute.ts @@ -5,6 +5,8 @@ import { replaceNodesMatchingAsync, } from "./tree.ts"; +import { cleanupJSON } from "$sb/lib/json.ts"; + import { system, YAML } from "../syscalls.ts"; /** @@ -31,7 +33,7 @@ export async function extractAttributes( const name = nameNode.children![0].text!; const val = valueNode.children![0].text!; try { - attributes[name] = await YAML.parse(val); + attributes[name] = cleanupJSON(await YAML.parse(val)); } catch (e: any) { console.error("Error parsing attribute value as YAML", val, e); }