Consolidate highlighter logic