-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(color): Fix handling of blank lines in YAML files. #3762
Conversation
We should really add a lot of unit tests to this code.... I'm afraid we'll run into other issues otherwise. |
Model and radio files have not had blank lines that I am aware of. |
Part of the problem was probably the assumption re: line endings... i.e. the theme file from #3760 actually worked fine for me fine in the simulator without removing the line... but that was because I copied the contents into a new file as I was going to remove that blank line, so the line endings were probably changed from UNIX/MAC to Windows style. I can repeatably break and unbreak it now by simply changing the line endings and resaving the file, with the blank line still there. Either way, now I'm going to check all the themes in the themes directory to make sure there are none with a blank line in them 😆 |
Hopefully not relevant after EdgeTX/edgetx#3762
@pfeerick I assigned this PR to me to force me to add some unit testing of these glare conditions. |
@philmoz I finally managed to make some basic unit tests that work with your fix but fail with |
@pfeerick it's planned to cherry-pick into |
Yes, that was the intention, as it was needed to prevent old themes from turning the UI into an un-navigable black hole 😆 |
* Fix handling of blank lines in YAML files. * Added some basic EOL / blank line unit tests --------- Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
I can inform you that old themes still cause a black screen when installing 2.9.1. I've had this happen with an older theme so I had to use a backup to get out of the black screen. Greats Claude |
If you have a theme that does this please upload a copy of it here. |
You can download an updated version of that theme from https://github.com/EdgeTX/themes |
Thanks ! |
Fixes #3760
Better handling of blank lines in YAML files in the case where the blank line was at the start of the parse buffer after a newline ended the previous buffer.