Okay, I found a pretty weird case where YAMLValidationError output shows the wrong line numbers.
I don't know why, but the combination of Slug, values with brackets and missing keys change the behaviour of line counter.
I couldn't reliably test it to discover what actually caused it, sorry.
Each line with brackets adds one to the line counter, but only in certain conditions (replacing "nós descobrimos" with "aaaaa" corrects this, as does changing what is inside some brackets). The number is correct if I don't use Slug as a key validator.
Edit: It seems to be due to long lines, actually.
Example yaml file that causes this.
# pode ser o nome de um arquivo em resources/saude ou o texto diretamente
Titulo: Sample text {key1} {key2} foi aaaaa para {underline_} lot{s} value{s} nós descobrimos
Resumo: Sample text {key1} {key2} foi aaaaa para {underline_} lot{s} value{s} nós descobrimos
Formatação:
Resumo:
MargemTopo: 24mm
Alinhamento Horizontal Numeros: desenho
Minimum example I could create that causes this behaviour
Okay, I found a pretty weird case where YAMLValidationError output shows the wrong line numbers.
I don't know why, but the combination of Slug, values with brackets and missing keys change the behaviour of line counter.
I couldn't reliably test it to discover what actually caused it, sorry.
Each line with brackets adds one to the line counter, but only in certain conditions (replacing "nós descobrimos" with "aaaaa" corrects this, as does changing what is inside some brackets). The number is correct if I don't use
Slug
as a key validator.Edit: It seems to be due to long lines, actually.
Example yaml file that causes this.
Minimum example I could create that causes this behaviour