Merge pull request #2156 from feitianbubu/pr/fix-tag-whitespace

fix: tag splitting by whitespace
This commit is contained in:
Seefs
2025-11-07 17:40:02 +08:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -128,7 +128,7 @@ export const useModelPricingData = () => {
if (!model.tags) return false;
const tagsArr = model.tags
.toLowerCase()
.split(/[,;|\s]+/)
.split(/[,;|]+/)
.map((tag) => tag.trim())
.filter(Boolean);
return tagsArr.includes(tagLower);

View File

@@ -23,7 +23,7 @@ import { useMemo } from 'react';
const normalizeTags = (tags = '') =>
tags
.toLowerCase()
.split(/[,;|\s]+/)
.split(/[,;|]+/)
.map((t) => t.trim())
.filter(Boolean);