Period sex and pregnancy

If you have sex on your period and happen to get pregnant does it stop or keep going