threedaymonk / htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
MIT License
325 stars 59 forks source link

Different results in Bash or Zsh #48

Closed ryanburnette closed 2 years ago

ryanburnette commented 6 years ago

When I run htmlbeautifier I get different results depending on whether I run it from Bash or Zsh.

Command

bundle exec htmlbeautifier build/**/*.html

Input

<div><div></div></div>
<div>
<div>
</div>
</div>

Bash Output

<div><div></div></div>
<div>
  <div>
  </div>
</div>

Zsh Output

<div>
  <div>
  </div>
</div>
<div>
  <div>
  </div>
</div>
threedaymonk commented 6 years ago

What is the difference between the output of env under bash and zsh?

ryanburnette commented 6 years ago

https://gist.github.com/ryanburnette/5d1de69ec7e516a45204b2547f91d2d0

strburst commented 6 years ago

Seemingly nothing interesting in the diff. (I just sorted and diffed the previous gist out of curiosity.)

--- /tmp/env.bash       2018-07-06 16:20:48.049031887 -0400
+++ /tmp/env.zsh        2018-07-06 16:20:56.893087235 -0400
@@ -14,12 +14,13 @@
 LOGNAME=rb
 LSCOLORS=Gxfxcxdxbxegedabagacad
 MY_RUBY_HOME=/Users/rb/.rvm/rubies/ruby-2.5.0
+OLDPWD=/Users/rb
 PAGER=less
-PATH=/Users/rb/.rvm/gems/ruby-2.5.0/bin:/Users/rb/.rvm/gems/ruby-2.5.0@global/bin:/Users/rb/.rvm/rubies/ruby-2.5.0/bin:/Users/rb/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/rb/bin:/Users/rb/.rvm/bin
+PATH=/Users/rb/.rvm/gems/ruby-2.5.0/bin:/Users/rb/.rvm/gems/ruby-2.5.0@global/bin:/Users/rb/.rvm/rubies/ruby-2.5.0/bin:/Users/rb/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/rb/bin
 PWD=/Users/rb/Development/beachbanners-middleman
 RUBY_VERSION=ruby-2.5.0
 SHELL=/bin/zsh
-SHLVL=2
+SHLVL=1
 SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.iJeIagaPoe/Listeners
 TERM=xterm-color
 TERM_PROGRAM=iTerm.app
threedaymonk commented 2 years ago

Closing this as there has been no activity for a while