[#1434] email highlighting

Fixes #1434 

~~Currently have a failing spec where searches return different results depending on case, though since authoring I think this is an existing problem.~~

Came across #1558 while working on this.
Use nested module/class definitions instead of compact style.