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:
parent
9b1d85c8c3
commit
8f4d131e46
1 changed files with 3 additions and 3 deletions
|
|
@ -494,9 +494,9 @@ fn findCommentStart(text: []const u8) ?usize {
|
||||||
var i: usize = 0;
|
var i: usize = 0;
|
||||||
while (i < text.len) : (i += 1) {
|
while (i < text.len) : (i += 1) {
|
||||||
if (text[i] == '#') {
|
if (text[i] == '#') {
|
||||||
// Verificar si hay al menos 2 espacios antes
|
// Verificar si hay al menos 1 espacio antes (cambiado de 2 a 1)
|
||||||
if (i >= 2 and text[i - 1] == ' ' and text[i - 2] == ' ') {
|
if (i >= 1 and text[i - 1] == ' ') {
|
||||||
return i - 2;
|
return i - 1;
|
||||||
}
|
}
|
||||||
if (i >= 1 and text[i - 1] == '\t') {
|
if (i >= 1 and text[i - 1] == '\t') {
|
||||||
return i - 1;
|
return i - 1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue