Simple paragraph parser in scala