Fix mixed-case custom extension matching#4290
Open
puneetdixit200 wants to merge 1 commit into
Open
Conversation
Ryuno-Ki
reviewed
Jun 5, 2026
| // on paths found from the file system glob search. | ||
| // TODO: Method name might just need to be renamed to something more accurate. | ||
| isFullTemplateFilePath(path) { | ||
| path = (path || "").toLowerCase(); |
Contributor
There was a problem hiding this comment.
Generally speaking: it's an anti-pattern to modify function arguments.
Can you use a new variable like the normalizedPath below?
Ryuno-Ki
reviewed
Jun 5, 2026
| @@ -0,0 +1 @@ | |||
| mixed-case custom extension | |||
Contributor
There was a problem hiding this comment.
What's the purpose of this file?
Ryuno-Ki
reviewed
Jun 5, 2026
| }`); | ||
| }); | ||
|
|
||
| test("Mixed-case custom template extensions are discovered, issue #4224", async (t) => { |
Contributor
There was a problem hiding this comment.
Ah, okay, so the content is less of importance. Gotcha.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
addExtension()extension names and keys before storing themvZomecustom extension and duplicate mixed-case registrationsFixes #4224.
Tests
npx ava --verbose test/EleventyExtensionMapTest.jsnpx ava --verbose test/EleventyTest.js --match='*issue #4224*'npx prettier --check src/UserConfig.js src/EleventyExtensionMap.js test/EleventyExtensionMapTest.js test/EleventyTest.jsnpx eslint src/UserConfig.js src/EleventyExtensionMap.js test/EleventyExtensionMapTest.js test/EleventyTest.js(passes with the existingsrc/UserConfig.jsunused-argument warning)npm run check(passes with existing warnings)npm run test:server(1417 passed, 20 skipped)npm run test:clientfails locally because Playwright browser executables are missing from~/Library/Caches/ms-playwright; Vitest reports to runnpx playwright install. The commit/push hooks hit the same local browser-cache blocker after the server suite passed.