The WYSIWYG editor option was introduced in June this year but caused problems with code posted under some circumstances
See Anybody else noticed an influx of code formatted as individual lines?
You may have inadvertently clicked on the option to use the WYSIWYG editor