Update parser.js

Fixes parsing of empty style tags.
And fixed a big bug that was there.
What is the regex for?