From 22e4bb21f01a6c99362a470a560df473d3b45efd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Sep 2025 00:27:20 +0000 Subject: [PATCH] Fix YAML parsing logic bug: replace impossible condition with proper indentation check Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- update-readme.js | 2 +- validate-collections.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/update-readme.js b/update-readme.js index ab3f152..dda4726 100755 --- a/update-readme.js +++ b/update-readme.js @@ -167,7 +167,7 @@ function parseCollectionYaml(filePath) { } else if (currentObject && leadingSpaces > 0) { // Property of current object (e.g., display properties) currentObject[key] = value === "true" ? true : value === "false" ? false : value; - } else if (currentArray && currentObject && leadingSpaces > leadingSpaces) { + } else if (currentArray && currentObject && leadingSpaces > 2) { // Property of array item object currentObject[key] = value; } diff --git a/validate-collections.js b/validate-collections.js index 28ab240..969d0f3 100644 --- a/validate-collections.js +++ b/validate-collections.js @@ -99,7 +99,7 @@ function parseCollectionYaml(filePath) { } else if (currentObject && leadingSpaces > 0) { // Property of current object (e.g., display properties) currentObject[key] = value === "true" ? true : value === "false" ? false : value; - } else if (currentArray && currentObject && leadingSpaces > leadingSpaces) { + } else if (currentArray && currentObject && leadingSpaces > 2) { // Property of array item object currentObject[key] = value; }