Skip to content

fix: ensure to_file() output ends with trailing newline#2205

Open
gaoflow wants to merge 1 commit into
openforcefield:mainfrom
gaoflow:fix-1761-trailing-newline
Open

fix: ensure to_file() output ends with trailing newline#2205
gaoflow wants to merge 1 commit into
openforcefield:mainfrom
gaoflow:fix-1761-trailing-newline

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 18, 2026

Copy link
Copy Markdown

POSIX-conformant text files should end with a newline character.
Without it, concatenating two OFFXML files with cat squishes the
closing tag of the first file with the opening tag of the second.

Add a trailing newline to the XML output written by to_file().

Fixes: #1761

POSIX-conformant text files should end with a newline character.
For example, concatenating two OFFXML files with cat squishes the
closing tag of the first with the opening tag of the second.

Add a trailing newline to the XML output written by to_file().

Fixes: openforcefield#1761
Signed-off-by: Vincent Gao <gaobing1230@gmail.com>
@gaoflow gaoflow requested a review from j-wags as a code owner June 18, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ForceField.to_file() writes files not ending with newline character

1 participant