Made a small fix for a bug that caused the parser to crash on some sites, it can now parse http://www.nature.com/nature/journal/v467/n7315/full/467531a.html and the bug probably affected some others too.
All of your tests still pass.
PS: sorry about the indentation
ctrl+A tab, lines looked way too long on my screen :)
sometimes the prevElement doesn't exist
Added another test for #6