[util/formatting] Fix a bunch of bugs
[util/formatting] Fix a bunch of bugs

That's what you get when you test with the published version,
rather than the one you're actually editing.

femhub/CodeMirror2,leoshine/CodeMirror,femhub/CodeMirror2,femhub/CodeMirror2,filonb/CodeMirror2,filonb/CodeMirror2,leoshine/CodeMirror,filonb/CodeMirror2