Raised in review on #1206, merged before the follow-up could land.
#1206 replaced \s*(.*?)\s*$ with (.*)$ plus trim(), and claimed no behaviour change. That held for the alphabet I tested, which had no line terminator in it. . excludes \r, U+2028 and U+2029 while \s includes them, so a line whose value ends in one of them no longer matches at all:
| line |
before #1206 |
after #1206 |
title:a + CR |
a |
no match, so "frontmatter needs a non-empty title" |
Measured over 400,000 random lines including CR, U+2028 and U+2029: 1338 lines where the field is now lost, all of them with the terminator in leading or trailing whitespace.
Not reachable through the normal path, since the block is split on \r?\n first; it takes something like \r\r\n line endings. Still a regression I introduced, and [\s\S]* closes it at no cost.
Raised in review on #1206, merged before the follow-up could land.
#1206 replaced
\s*(.*?)\s*$with(.*)$plustrim(), and claimed no behaviour change. That held for the alphabet I tested, which had no line terminator in it..excludes\r, U+2028 and U+2029 while\sincludes them, so a line whose value ends in one of them no longer matches at all:title:a+ CRaMeasured over 400,000 random lines including CR, U+2028 and U+2029: 1338 lines where the field is now lost, all of them with the terminator in leading or trailing whitespace.
Not reachable through the normal path, since the block is split on
\r?\nfirst; it takes something like\r\r\nline endings. Still a regression I introduced, and[\s\S]*closes it at no cost.