I think you are referring to combustion of Mg, which gives a very bright white light. No, the white light from burning Mg in oxygen is not a line spectrum. It is a continuous spectrum given off by the hot particles of MgO, which emit a broad continuous spectrum. The characteristic line emission spectrum of Mg is very faint. Here is a graph of the spectrum given off by burning magnesium:
The sharp lines are the atomic emissions of Mg, superimposed on the broad continuous spectrum. Burning magnesium was once used in photography, for "flash photography" precisely because it gives off a bright white continuous spectrum.