A state tax that would have added 5% to all purchases of snack foods has been voted down by Maryland legislators.