From 0c88ad95b8f30bb752915516e41ad8661339b1b9 Mon Sep 17 00:00:00 2001 From: Asif Mahmud Shimon Date: Sun, 31 Oct 2021 23:55:26 +0600 Subject: [PATCH] strip trailing CR (#54) * strip trailing CR * updated changelog for pr #54 Co-authored-by: Asif Mahmmud Shimon --- CHANGELOG.md | 3 +++ apheleia.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe1a7a..157b3ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ The format is based on [Keep a Changelog]. will no longer trigger a reconnect every time you save. * Fix inconsistent `:type` spec preventing use of `customize-variable` on `apheleia-formatters`. +* Fix mixed style line ending generated by `diff` ([#54]) by adding + `--strip-trailing-cr` to `diff`'s argument list. [#24]: https://github.com/raxod502/apheleia/pull/24 [#30]: https://github.com/raxod502/apheleia/issues/30 @@ -41,6 +43,7 @@ The format is based on [Keep a Changelog]. [#39]: https://github.com/raxod502/apheleia/issues/39 [#48]: https://github.com/raxod502/apheleia/pull/48 [#49]: https://github.com/raxod502/apheleia/pull/49 +[#54]: https://github.com/raxod502/apheleia/pull/54 ## 1.1.2 (released 2021-02-26) ### Enhancements diff --git a/apheleia.el b/apheleia.el index 5e521a9..5cc18db 100644 --- a/apheleia.el +++ b/apheleia.el @@ -384,7 +384,7 @@ as its sole argument." (with-current-buffer (get-buffer-create " *apheleia-patch*") (erase-buffer) (apheleia--make-process - :command `("diff" "--rcs" "--" + :command `("diff" "--rcs" "--strip-trailing-cr" "--" ,(or old-fname "-") ,(or new-fname "-")) :stdin (if new-fname old-buffer new-buffer)