Resonance line shapes in stripping reactions into the continuum