Skip to content

fix: add trailing newline to bean files#77

Merged
hmans merged 1 commit intohmans:mainfrom
Maxi91f:fix/trailing-newline
Jan 29, 2026
Merged

fix: add trailing newline to bean files#77
hmans merged 1 commit intohmans:mainfrom
Maxi91f:fix/trailing-newline

Conversation

@Maxi91f
Copy link
Copy Markdown
Contributor

@Maxi91f Maxi91f commented Jan 28, 2026

Bean files don't end with a trailing newline, which violates POSIX convention for text files and can cause issues with some tools/editors/ide and causes many pre-commit hooks to raise errors.

Changes

  • Render() now ensures files end with newline
  • Parse() trims trailing newline from body to maintain roundtrip consistency
  • Added TestRenderTrailingNewline test

Testing

All tests pass locally.
Also tested manually.


BTW, great project, thanks.

Bean files now end with a newline character, following POSIX convention
for text files.

- Render() ensures files end with newline
- Parse() trims trailing newline from body to maintain roundtrip consistency
- Added TestRenderTrailingNewline test
Copy link
Copy Markdown
Owner

@hmans hmans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, thank you!

@hmans hmans merged commit c36744a into hmans:main Jan 29, 2026
1 check passed
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.

2 participants