Iterates through the text line by line