It's a Class C drug, and isn't known whether it will harm the baby. That said, you never want to take anything during pregnancy unless you've talked to your doctor about it first, even if you were given it before you were pregnant. There might be something better they can give you or they might take you off completely.
This question is for your doc, not us -- your doc should know all the medications you take. You can google it for contraindications, but this needs to be discussed with your doc.