The issue with foods like onions and garlic is that they contain pungent oils that get carried through your bloodstream to your lungs. When you breathe out, the pungent leftovers are exhaled too.
However here are a few foods that can help to mask breath odour until you brush your teeth:
Parsley – probably one of the most well-known ways to treat bad breath. Its oils are what do the trick. Likewise, some other herbs and spices that will do the trick are spearmint, cinnamon, coriander, tarragon, eucalyptus, rosemary, and cardamom.