So, while working on some documentation, I've noticed that there's a lot of
mismatched spaces and tabs in the standard library. Is there a real
convention for this? Would a patch that converts everything to two spaces
rather than tabs, and removes white spaces at the ends of lines be accepted?

I'd imagine that being consistent is better than a patchwork of indentation.