fix: robust coaster matching + dark carnival color scheme
Matching fixes: - normalize() now strips all non-word/non-space chars via [^\w\s] instead of a hand-rolled list, catching !, curly apostrophe (U+2019), and any future edge cases - Add isCoaster() helper with prefix matching (min 5 chars) to handle subtitle mismatches in either direction (e.g. "Apocalypse" vs "Apocalypse the Ride", "The New Revolution - Classic" vs "New Revolution") - Fix top-level rides loop which still used coasterNames.has(normalize()) instead of isCoaster() — this was the recurring bug causing top-level rides to miss UI: - Dark neutral base (#111) replacing cold navy and muddy purple - Neon accent palette: hot pink, electric green, vivid yellow, cyan - Park page max-width 960→1280px, calendar cells 72→96px tall - Scrollbar accent matches theme Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,9 +67,9 @@ export function areCoastersStale(entry: ParkMeta): boolean {
|
||||
*/
|
||||
export function normalizeRideName(name: string): string {
|
||||
return name
|
||||
.replace(/[™®©]/g, "")
|
||||
.replace(/[\u2122\u00ae\u00a9™®©]/g, "")
|
||||
.replace(/^the\s+/i, "")
|
||||
.replace(/[-:'".]/g, " ")
|
||||
.replace(/[^\w\s]/g, " ")
|
||||
.replace(/\s+/g, " ")
|
||||
.toLowerCase()
|
||||
.trim();
|
||||
|
||||
Reference in New Issue
Block a user