According to my Child Psychology prof, the answer is yes. :) Babies can taste flavors in the amniotic fluid and in breast milk, and they prefer familiar tastes.
Many decades later my wife's pulmonary Doctor suspected her mom smoking contributed to her health issues. I think my mom's also affected me. It is serious.