It depends on the pregnancy and the health/build of the mother.
If fasting won’t harm her or her fetus, then she should fast. But if she has a medical condition, or she is having a difficult pregnancy, or if she fears that fasting would affect her health or her baby’s health (even it she has no medical conditions), then she can break her fast. She can try fasting a few days, and if she feels she is ok she can continue fasting.