Format code snippets correctly