Skip to content

Updated module_name regexp to not match incorrect indexes#238

Merged
rafaelfranca merged 1 commit intorails:mainfrom
calebowens:fix-regex-for-super-indexes
Apr 19, 2024
Merged

Updated module_name regexp to not match incorrect indexes#238
rafaelfranca merged 1 commit intorails:mainfrom
calebowens:fix-regex-for-super-indexes

Conversation

@Caleb-T-Owens
Copy link
Copy Markdown
Contributor

This updates the regex used to identify index files to ensure that modules like foo/special_index don't get mapped to foo.

The cause of the problem was that the previous regex matched 1 or 0 / characters, which meant anything followed by index and the end of the string, would qualify. We now ensure that we match either the start of the string or /

@mylons
Copy link
Copy Markdown

mylons commented Feb 9, 2024

looks good to me! looks better than my solution i think: mylons@c5cb32b

@rafaelfranca rafaelfranca merged commit 2ecde30 into rails:main Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

files ending in _index.js have index replaced with an empty string

3 participants