executablebooks / mdformat

CommonMark compliant Markdown formatter
https://mdformat.rtfd.io
MIT License
439 stars 46 forks source link

Do not update the timestamp of the files when they are left unchanged #357

Closed paugier closed 2 years ago

paugier commented 2 years ago

Describe the bug

mdformat updates the timestamp of the files even when they are left unchanged. Instead, mdformat should not touch files when they are left unchanged (as black does for example).

Reproduce the bug

Use stat and mdformat on one well formatted file.

List your environment

No response

hukkin commented 2 years ago

Thanks for the issue and the PR!

I agree we should change this. I hope I'll have the time to review the PR soon. :smile_cat: