yasuyk / web-beautify

Format HTML, CSS and JavaScript/JSON by js-beautify
GNU General Public License v3.0
219 stars 21 forks source link

Fails on MS Windows as js-beautify cmd exits with no direct output #32

Open he-la opened 6 years ago

he-la commented 6 years ago

On MS Windows, calling the beautify functions simply deletes all content of the buffer. I believe this is because js-beautify is a shell script that opens a node.js process on the js-beautify module. Thus, the script itself has no direct output. This behaviour can also be observed by simply invoking js-beautify from M-x shell or similar methods.

For the record, this bug also exists in the package prettier-js, and probably others.

I have tried to fix the issue by invoking node.exe directly. Unfortunately, this process somehow never terminates when called from emacs.