Dr. Mustafa Khattab, the Clear Quran - 24:3

Translation for 24:3

A male fornicator would only marry a female fornicator or idolatress. And a female fornicator would only be married to a fornicator or idolater. This is ˹all˺ forbidden to the believers.1

Foot notes

77035

 It is reported in a ḥadîth collected by At-Tirmiⱬi that Marthad ibn Abi Marthad, a companion of the Prophet (ﷺ), asked if he could marry ’Anâq, a pagan prostitute he befriended in Mecca before he accepted Islam. So this verse was revealed. However, if someone committed a sin then later repented genuinely, they will be accepted by Allah and the rest of the believers.