[UnitTests] Fixed html writer tests.
[Refactoring] Fixed null reference exception.
[TextEditor] Fixed bug in highlighting/fixed highlighting unit tests.