Umm Salama bint Abu Umaya reported,

A woman from the tribe of Aslam named Sabia was married to a man who died while she was pregnant. Abu Sanabil bin Bakak proposed to her, but she refused to marry him.He said, "By Allah, it is not lawful for you to marry him until you complete the longer of the two waiting periods."So she waited about ten nights, then came to the Prophet ﷺ, who said, "Marry."

Bukhari 5318

Sahih

حدثنا يحيى بن بكير حدثنا الليث عن جعفر بن ربيعة عن عبد الرحمن بن هرمز الأعرج قال أخبرني أبو سلمة بن عبد الرحمن أن زينب بنت أبي سلمة أخبرته

عن أمها أم سلمة زوج النبي ﷺ

أن امرأة من أسلم يقال لها سبيعة كانت تحت زوجها توفي عنها وهي حبلى فخطبها أبو السنابل بن بعكك فأبت أن تنكحه فقال والله ما يصلح أن تنكحيه حتى تعتدي آخر الأجلين فمكثت قريبا من عشر ليال ثم جاءت النبي ﷺ فقال انكحي

البخاري 5318صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Divorce
Chapter
And for those who are pregnant, their term is until they deliver their burden
Numbering
Darussalam 5318
Bukhari 5318