From 76bdc7e06555ec4f411e544de5c764839914c635 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Sat, 27 Dec 2025 09:56:52 +0300 Subject: [PATCH] Refactor block scalar handling in config parser Simplifies the logic for handling block scalar content by restructuring the conditional checks for blockScalarParentIndent. This improves readability and ensures correct processing of indented lines. --- www/config.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/config.html b/www/config.html index eaf6bcdf..05363c4c 100644 --- a/www/config.html +++ b/www/config.html @@ -595,13 +595,13 @@ if (!line.trim()) continue; const indent = countIndent(line); - if (blockScalarParentIndent !== null && indent <= blockScalarParentIndent) { - blockScalarParentIndent = null; + if (blockScalarParentIndent !== null) { + if (indent <= blockScalarParentIndent) { + blockScalarParentIndent = null; + } else { + continue; // treat as block scalar content + } } - if (blockScalarParentIndent !== null && indent > blockScalarParentIndent) { - continue; // treat as block scalar content - } - if (indent === 0 && (hasTopLevelKey || hasTopLevelList)) { const trimmed = line.trim(); if (trimmed !== '---' && trimmed !== '...' && !trimmed.startsWith('#')) {