trim trailing whitespace, use relative line numbers