Strip excess newlines from formatting test