add spans, make the parser work with nested tags