-
Notifications
You must be signed in to change notification settings - Fork 62
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
Trailing empty line in <file> is stripped #426
Comments
Anything new on that topic? |
This does need to be fixed. |
Could you test the diff below?
|
Thanks for the diff, I tested it, and it looks good to me. With that solution you always will have an empty line at the end, which is in my opinion the better default. For me that would be fine, because that scenario is probably just an edge case and here |
The changes of the decoding in v15.3 (introduced by 3c5923e) seems to remove trailing empty lines within the
<file>
command.Most of the time this wouldn't be an issue, but there are some cases where you want to overwrite for example a conf file, where a trailing empty line is required for proper parsing.
We discovered that with the following example:
With v15.3 there is no newline character at the end which leads to the issue that
local-gen
is ignoring the last line and in this case the localesde_DE
are not generated.I think that behavior can create quite some confusion to the user.
Of course, there are workaround to this by using the
encoding="raw"
or using an archive file instead of creating the file within the finetuning.But is this behavior expected and also desired for the case of the
<file>
command, when introducingstrip_leading_whitespace_from_lines()
?The text was updated successfully, but these errors were encountered: