Skip to content

Match markup file extensions without regard to case - #2098

Open
Hashim1999164 wants to merge 1 commit into
github:masterfrom
Hashim1999164:fix/case-insensitive-markup-extensions
Open

Match markup file extensions without regard to case#2098
Hashim1999164 wants to merge 1 commit into
github:masterfrom
Hashim1999164:fix/case-insensitive-markup-extensions

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 18, 2026

Copy link
Copy Markdown

Fixes #2038

When Linguist is not loaded, the renderer picks a format from the filename extension. Interpolating the format regexp into the filename pattern kept the inner expression case sensitive, so README.MD did not match md.

The filename pattern now uses the regexp source with a case insensitive flag, so README.MD and README.Markdown resolve as markdown.

Coverage tests assert uppercase and mixed case markdown extensions still match, while README.txt still does not.

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.

[Bug] The GHFM previewer fails when its file extension is capitalised.

1 participant