Update parser.js

Fixes parsing of empty style tags.
And fixed a big bug that was there.
I think unnecessary. Trim should take care of spaces, tabs, newlines.