From 8f4d131e467e091b6bba5b397fe3cc8fcb5117e6 Mon Sep 17 00:00:00 2001 From: reugenio Date: Fri, 19 Dec 2025 12:48:09 +0100 Subject: [PATCH] fix: Parsing comentarios - aceptar 1 espacio antes de # MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El parser de líneas de configuración requería 2 espacios antes del comentario (` #`), pero el formato estándar usa 1 espacio (` #`). Esto causaba que valores como "GrisBorde # color placeholder" no se parsearan correctamente, incluyendo el comentario en el valor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/zcatconfig.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zcatconfig.zig b/src/zcatconfig.zig index a87f7b4..570ce02 100644 --- a/src/zcatconfig.zig +++ b/src/zcatconfig.zig @@ -494,9 +494,9 @@ fn findCommentStart(text: []const u8) ?usize { var i: usize = 0; while (i < text.len) : (i += 1) { if (text[i] == '#') { - // Verificar si hay al menos 2 espacios antes - if (i >= 2 and text[i - 1] == ' ' and text[i - 2] == ' ') { - return i - 2; + // Verificar si hay al menos 1 espacio antes (cambiado de 2 a 1) + if (i >= 1 and text[i - 1] == ' ') { + return i - 1; } if (i >= 1 and text[i - 1] == '\t') { return i - 1;