Update parser.js

Fixes parsing of empty style tags.
And fixed a big bug that was there.
Typo?