Refactored span elements parser and fixed bugs in it.
Generated HTML after previous commits.