Refactor combine_highlight helper to be non-janky, courtesy of Aria Stewart.