You can drop the leading and trailing newlines around code fences. They actually come through in the rendering so they aren't desirable.