fix: Parsing comentarios - aceptar 1 espacio antes de #

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 <noreply@anthropic.com>
This commit is contained in:
reugenio 2025-12-19 12:48:09 +01:00
parent 9b1d85c8c3
commit 8f4d131e46

View file

@ -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;