(normalizedName: string)
| 109 | } |
| 110 | |
| 111 | function getPreferredImageLookupKeys(normalizedName: string): string[] { |
| 112 | const keys: string[] = []; |
| 113 | const addKey = (key: string) => { |
| 114 | if (!key || keys.includes(key)) return; |
| 115 | keys.push(key); |
| 116 | const lowerKey = key.toLowerCase(); |
| 117 | if (lowerKey !== key && !keys.includes(lowerKey)) { |
| 118 | keys.push(lowerKey); |
| 119 | } |
| 120 | }; |
| 121 | |
| 122 | if (!normalizedName.toLowerCase().startsWith('images/')) { |
| 123 | addKey(`images/${normalizedName}`); |
| 124 | } |
| 125 | addKey(normalizedName); |
| 126 | return keys; |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Diagnostic function: Find images that don't have corresponding files. |
no test coverage detected