Closed leonardo-dgs closed 4 years ago
The empty lines bug happens only when the option ConfigSettings
is set to PRESERVE_COMMENTS
Yeah, this is known and it only happens with no comments at all. I can have a look at it.
@JavaFactoryDev this happens even if there are comments, and after each comment are inserted several empty lines.
Should be fixed with the latest release.
Please tell me whether is still occurs or not.
@JavaFactoryDev now this bug no longer occurs, but Yaml#addHeaders
and Yaml#setHeaders
works only if there is at least one empty line or comment at the beginning of the file.
Thanks for reporting it! This is indeed intended as we can't distinguish between both if there are no empty lines.
Describe the bug LightningStorage generates a new line character after each Yaml config key and even a space after a section key, it's annoying. If it is expected, in the API should be added the mentioned styling options.
Code
Config output
Expected behavior I expected that Yaml configs would be generated like in the screenshots in the SpigotMC plugin page.