leading and trailing empty lines will be removed.