Simplify startsWith and endsWith shims.
Reset syntax highlighter after headers not before.

Diff headers are truncated at a certian length which means
we can end up inside a string on the next line if we don't
reset after.