Add string comments

This commit is contained in:
Sam Becker 2025-07-17 09:01:33 -05:00
parent 27b0b4965a
commit 38768de87c
2 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import { APP_DEFAULT_SORT_BY, SortBy } from '../sort';
export const GENERATE_STATIC_PARAMS_LIMIT = 1000;
export const PHOTO_DEFAULT_LIMIT = 100;
// These must mirror utility/string.ts parameterization
const CHARACTERS_TO_REMOVE = [',', '/'];
const CHARACTERS_TO_REPLACE = ['+', '&', '|', ' '];

View File

@ -27,6 +27,7 @@ export const parameterize = (
// Remove punctuation
.replaceAll(/['"!@#$%^*()=[\]{};:/?,<>\\/`~]/gi, '')
// Removes non-alphanumeric characters, if configured
// (breaks i18m)
.replaceAll(
shouldRemoveNonAlphanumeric
? /([^a-z0-9-])/gi