bterlson/test262-harness

frontmatter RegExp not capturing parts using CR only as lineterminator

leobalter opened this issue · 2 comments

https://github.com/bterlson/test262-harness/blob/master/bin/run.js#L156

const endFrontmatterRe = /---\*\/\r?\n/g;

This won't capture the frontmatter pieces of files using CR only as eol.

e.g.: https://github.com/tc39/test262/blob/master/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js

Probably a minor and not so harmful ,but I'd like to know what's the best regexp for fixing this anyway.

Maybe [\r\n]+ instead of \r?\n ? It's a bit loose but it still gets what we need there?

[\r\n]+ should work fine!

Parsing frontmatter will no longer be handled directly by test262-harness in 4.0.0.

cc @jugglinmike