consider the whole line instead of filename/text V2

Alternative implementation discussed on pull #8