Not to be harsh, but if your friend isn't willing to quit on her own, she's not going to quit when you tell her the risks. I'm sure she already knows and doesn't care. Addicts put their addiction over other people and often make up excuses to delay quitting or not at all. You're doing the right thing expressing concern but I would definitely tell her doctor or report her if she will not take care of it herself. No child should be put at risk like this. It's child abuse. I'm so sorry you're put in such a difficult spot. She's your friend and you're trying to help her without making things worse. That may not be possible, though.
If she's still doing it she obviously doesn't care about her baby so I'd contact her doctor or Dhs ect because she will have her baby taken until she completes the courses Dhs ask for her to keep her baby. She can't hide it because when they do urine test at doctor's appointment or even before you deliver they check for drugs
If she wants to keep her baby after it's born she would be wise to quit. If she has drugs in her system or if the baby shows signs of withdrawals they will bring a social worker and she won't have custody of her child. Happened to a family friend.
I would let her doctor know or take her to a rehab where she can get help
Unfortunately most drug addicts only get help when they are ready to get help. You can try to call her Dr and give an anonymous tip. You could Google effects or give her a book on the effects of it on baby
In all honesty, I believe the best thing to do is to tell her doctor if she won't. That way the doctor at least knows and can proceed with the knowledge