Stop newlines appearing at the end of each code snippet