Closed coen-hyde closed 11 years ago
Not a problem. Unfortunately, this repo is just a grunt wrapper around maxogden/commonjs-html-prettyprinter.
It might be possible with adding script
to the unformatted option but that is best tested in a proof of concept.
Care to give it a go?
Looking into this: https://gist.github.com/4167514 Should have our answer in a second.
I am not seeing the JS auto-formatting as you described; the output I get from my gist is
<div>
<div>
<div>
<script>
console.log('hey');console.log('what\'s up doc?');console.log('nada mucho senor');
</script>
</div>
</div>
</div>
which is unformatted JS. Can you provide me with a better test case?
Hi twolfson,
Thanks for investigating. I figured it out, here's my fork https://gist.github.com/4167690. It was as simple as html npm package versions. grunt-html-prettyprinter uses on html@0.0.6 while the gist used html@0.0.7. I'll submit a pull request in a sec.
Thanks, Coen
Awesome! Thanks, I will merge that right away.
I still do like having the option of beautifying/not beautifying inline-js but it seems our fate is cast to the windows of other modules. I will probably open an issue to add it as an option =P
Bumped version to 1.1.0 and published to npm. You should be all set =)
Thanks
Thanks for the grunt task.
I noticed this task also formats javascript. It would be good if it had a flag to turn this functionality off.