Simpler, more robust highlighting of pattern names in markup view.