Update source code formatting

Two things to check:
 - Formatting results are correct and selection highlighting is preserved
 - Formatting results should have CR LF line endings on Windows

Fix #361.
Fix #369.