adjust end_offset in highlighter