Improve marked text rendering / fixed a related bug.