adapted line splitter for consec. whitespaces
trim lines before splitting