“If a woman kills someone deliberately, she should not be killed until she delivers what is in her womb, if she is pregnant, and until the child's sponsorship is guaranteed. And if a woman commits illegal sex, she should not be stoned until she delivers what is in her womb and until her child's sponsorship is guaranteed.”
Sunan Ibn Majah Book 21, Hadith 80