bug fix: the input string is now stripped of any blank lines before and after the start and finish of lines of text.