Skip to content

Commit eeb9497

Browse files
authored
fix: Add .webm to know file types (#4171)
1 parent a511d70 commit eeb9497

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

packages/cspell-lib/src/LanguageIds.test.ts

+17-15
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,23 @@ describe('Validate LanguageIds', () => {
100100
});
101101

102102
test.each`
103-
filename | expected
104-
${'README.md'} | ${false}
105-
${'run.exe'} | ${true}
106-
${'lib.obj'} | ${true}
107-
${'lib.dll'} | ${true}
108-
${'lib.o'} | ${true}
109-
${'image.PNG'} | ${true}
110-
${'image.JPG'} | ${true}
111-
${'image.gif'} | ${true}
112-
${'picture.jpeg'} | ${true}
113-
${'picture.jpg'} | ${true}
114-
${'doc.txt'} | ${false}
115-
${'lock'} | ${false}
116-
${'Gemfile'} | ${false}
117-
${'.cspellcache'} | ${false}
103+
filename | expected
104+
${'README.md'} | ${false}
105+
${'run.exe'} | ${true}
106+
${'lib.obj'} | ${true}
107+
${'lib.dll'} | ${true}
108+
${'lib.o'} | ${true}
109+
${'image.PNG'} | ${true}
110+
${'image.JPG'} | ${true}
111+
${'image.gif'} | ${true}
112+
${'picture.jpeg'} | ${true}
113+
${'picture.jpg'} | ${true}
114+
${'doc.txt'} | ${false}
115+
${'lock'} | ${false}
116+
${'Gemfile'} | ${false}
117+
${'.cspellcache'} | ${false}
118+
${'my-video.webm'} | ${true}
119+
${'my-logo.svg'} | ${false}
118120
`('isGeneratedExt $filename => $expected', ({ filename, expected }) => {
119121
expect(LangId.isBinaryFile(filename)).toBe(expected);
120122
});

packages/cspell-lib/src/LanguageIds.ts

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ export const languageExtensionDefinitions: LanguageDefinitions = [
255255
{ id: 'jar', extensions: ['.jar'], format: 'Binary' },
256256
{ id: 'spv', extensions: ['.spv'], format: 'Binary', description: 'SPSS Output Document' },
257257
{ id: 'mdb', extensions: ['.mdb'], format: 'Binary', description: 'Microsoft Access DB' },
258+
{ id: 'webm', extensions: ['.webm'], format: 'Binary', description: 'WebM is an audiovisual media file format.' },
258259
];
259260

260261
export type LanguageId = string;

0 commit comments

Comments
 (0)