Pregnant but not married

so if some lady got pregnant and then the husband died, the lady should terminate the pregnancy?