Continuum opacity produced by spectral lines in supernovae and similar expansions