Doctor gave me stool softer and a prescription for gas

Can that affect baby if I’m breast feeding? She’s been having diarrhea along with nasty farts. I tried formula today and it seems to be a little better while I get the pills out of my system. But she’s still having diarrhea here and there.

Edit: I know newborn poop is normally runny. But idk you can just tell this is different. It’s stinks and it’s always along with wet farts. Also I’ve been having diarrhea also so I’m thinking that has to be it.