Don't style unnecessary empty spans

fixes the bug where ending line breaks causes the CodeArea to error