feat: updated plant based tag

This commit is contained in:
Leyla Becker 2026-02-20 14:14:13 -06:00
parent c5fe64e460
commit 94d29d20c2
62 changed files with 64 additions and 64 deletions

View file

@ -6,10 +6,10 @@ const { DateTime } = require("luxon");
const extractDietTags = (filePath) => {
try {
const content = fs.readFileSync(filePath, 'utf-8');
const dietTagRegex = /#diet\/(omnivore|vegetarian|plant-based)(?:\/optional)?/g;
const dietTagRegex = /#diet\/(omnivore|vegetarian|plant_based)(?:\/optional)?/g;
const matches = content.match(dietTagRegex) || [];
return matches.map(tag => {
const match = tag.match(/#diet\/(omnivore|vegetarian|plant-based)/);
const match = tag.match(/#diet\/(omnivore|vegetarian|plant_based)/);
return match ? match[1] : null;
}).filter(Boolean);
} catch (e) {
@ -26,7 +26,7 @@ const getPlantBased = (filePath) => {
const hasOmnivore = dietTags.includes('omnivore');
const hasVegetarian = dietTags.includes('vegetarian');
const hasPlantBased = dietTags.includes('plant-based');
const hasPlantBased = dietTags.includes('plant_based');
if (hasPlantBased) {
return true;