Divorce was permitted for “fornication” if the husband found uncleaness in his betrothed (that is, “wife”, but before they had come together to consumate the marriage).
It was for this reason that Joseph considered putting Mary away, since she was pregnant and he knew that the child could not possibly be his, since their marriage night had not yet taken place.
After consumation of marriage, “fornication” is not the sin that takes place. The bible calls that sin “adultery”. Under these grounds the adulterous member can be put to death. Divorce is not necessary to dissolve the marriage.
After the death of the spouse, the surviving spouse is free to remarry without committing adultery.
See Romans 7:1-4.
Don't forget that thing about "Let he who is without sin cast the first stone".