remove trailing in snippets