Tl;dr: both work. From the ssh_config man page:
Configuration options may be separated by whitespace or
optional whitespace and exactly one `='; the latter format
is useful to avoid the need to quote whitespace when
specifying configuration options using the ssh, scp, and
sftp -o option.