Removing leading and trailing new lines from snippets.