rtts / djhtml

Django/Jinja template indenter
GNU General Public License v3.0
572 stars 32 forks source link

djhtml no longer outputs result if unchanged in non-inplace mode #14

Closed sjoerdjob closed 3 years ago

sjoerdjob commented 3 years ago

Broken in https://github.com/rtts/djhtml/commit/aa7297052375b61868f9c283730114de8fc635db

% (echo '<a>'; echo 'hello'; echo '</a>') | djhtml
<a>
    hello
</a>
% (echo '<a>'; echo '    hello'; echo '</a>') | djhtml
%

This made sense for the in-place variant, but not for the not-in-place variant.

Similarly,


% djhtml -o newbad.html bad.html
Successfully reformatted newbad.html
% djhtml -o newgood.html good.html
%