[minor] Spaces after each `if` and don't break lines here (also in the above call to substring).