WGUNDERWOOD / tex-fmt

An extremely fast LaTeX formatter written in Rust
MIT License
272 stars 20 forks source link

It produce an empty newline at EOF with `--stdin`, which works differently as latexindent #51

Closed amalgame21 closed 2 weeks ago

amalgame21 commented 2 weeks ago

It produce an empty newline at EOF with --stdin

e.g. cat text.tex |tex-fmt --stdin| tex-fmt --stdin This command produce 2 empty newline at EOF.

I am testing it with neovim formatter with comform.nvim plugin It works by configuring it using --stdin as args. Everytime I apply the formatter by keymaps, it create a newline at the end of the file. latexindent do not do that.

WGUNDERWOOD commented 2 weeks ago

Thanks for catching this. I have added a fix on the main branch at 2c3030c54ea7c8f4a117f8b371bb5bcef2522134. The culprit was using println! instead of print.