Use html.indexOf instead of the regex match

The problem with the regex match is it gets corrupted by stripping
comments, so the line numbers are no longer correct. indexOf will
find the first matching string, which will sometimes be incorrect.

Possibly a better fix is to detect duplicates and suppress line number
information if they are there. Although if there are duplicates,
they are both likely in error.