We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c2b7eb commit c3c24ebCopy full SHA for c3c24eb
packages/web/src/lib/gitattributes.ts
@@ -64,7 +64,7 @@ export function parseGitAttributes(content: string): GitAttributes {
64
export function resolveLanguageFromGitAttributes(filePath: string, gitAttributes: GitAttributes): string | undefined {
65
let language: string | undefined;
66
for (const rule of gitAttributes.rules) {
67
- if (micromatch.isMatch(filePath, rule.pattern) && rule.attrs['linguist-language']) {
+ if (micromatch.isMatch(filePath, rule.pattern, { matchBase: true }) && rule.attrs['linguist-language']) {
68
language = rule.attrs['linguist-language'];
69
}
70
0 commit comments