If there is a newline at the end of a snippet definition file, YASnippet will add a newline when expanding that snippet. When editing or saving a snippet file, please be careful not to accidentally add a terminal newline.
Note that some editors will automatically add a newline for you. In Emacs, if you set require-final-newline to t , it will add the final newline automatically.