mpf icon indicating copy to clipboard operation
mpf copied to clipboard

Ignore empty lines (whitespace) at the beginning of yaml files

Open cfbenn opened this issue 3 years ago • 2 comments

Request:

It appears that MPF looks for "#config_version=5" on the very first line. If it is on the second line (after a crlf) it will throw the following error:

AssertionError: Version mismatch. Expected: #config_version=5 Actual: Files: [file path]

Ignoring leading white space should fix this.

cfbenn avatar Sep 25 '20 03:09 cfbenn

I don't think this is a very good idea. Why do you want this exactly?

jabdoa2 avatar Oct 03 '20 12:10 jabdoa2

Various times I have added in a leading CRLF and it has caused a runtime issue. I assumed since leading space/crlf's aren't really valid, they could be stripped to make the YAML a little more forgiving.

cfbenn avatar Oct 08 '20 02:10 cfbenn