/
vshmidt
/
label-studio
Обзор
Документация
Войти
/
vshmidt
/
label-studio
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
web/libs/core/src/lib/preview/utils.ts
15 строк
485 B
Yousif Yassi
fix: FIT-287: [FE] Large labeling interface causing to freeze LS (#9211)
24 янв 2026, 03:32
Не верифицирован
24 янв 2026, 03:32
13bb0fa
Код
Авторство
О чём код?
/** * Utility functions for preview components */ /** * Count the number of XML tags in a config string. * Uses a simple regex to count opening tags (excluding self-closing markers). */ export function countConfigTags(config: string): number { if (!config) return 0; // Match opening tags like <View, <Labels, <Image etc. // This counts all tags including self-closing ones const matches = config.match(/<[A-Za-z][A-Za-z0-9]*/g); return matches ? matches.length : 0; }