RTS parser: Stop preserving lack of newlines at EOF
The interaction between preserving the missing trailing newline and
supporting empty fields (which is permitted for debian/control
according to the Debian Policy) would require a lot of complex code
for very little gain. This commit therefore removes the preserving
the missing newline at EOF.
As a consequence, remove the keepends=True from most examples as it
is not important (we keep it internally in the code as it should be
slightly effective but not worth making big fuss about in the average
case).
With this change, the code no longer generates broken output when the input includes a field that does not end with a newline and another field is added (or moved) after it.
Signed-off-by: Niels Thykier niels@thykier.net
Edited by Niels Thykier