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

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.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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