Move highlight text to text processing.

Also add tests.