Skip to content

Commit

Permalink
fix: Add .webm to know file types (#4171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Feb 14, 2023
1 parent a511d70 commit eeb9497
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
32 changes: 17 additions & 15 deletions packages/cspell-lib/src/LanguageIds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,23 @@ describe('Validate LanguageIds', () => {
});

test.each`
filename | expected
${'README.md'} | ${false}
${'run.exe'} | ${true}
${'lib.obj'} | ${true}
${'lib.dll'} | ${true}
${'lib.o'} | ${true}
${'image.PNG'} | ${true}
${'image.JPG'} | ${true}
${'image.gif'} | ${true}
${'picture.jpeg'} | ${true}
${'picture.jpg'} | ${true}
${'doc.txt'} | ${false}
${'lock'} | ${false}
${'Gemfile'} | ${false}
${'.cspellcache'} | ${false}
filename | expected
${'README.md'} | ${false}
${'run.exe'} | ${true}
${'lib.obj'} | ${true}
${'lib.dll'} | ${true}
${'lib.o'} | ${true}
${'image.PNG'} | ${true}
${'image.JPG'} | ${true}
${'image.gif'} | ${true}
${'picture.jpeg'} | ${true}
${'picture.jpg'} | ${true}
${'doc.txt'} | ${false}
${'lock'} | ${false}
${'Gemfile'} | ${false}
${'.cspellcache'} | ${false}
${'my-video.webm'} | ${true}
${'my-logo.svg'} | ${false}
`('isGeneratedExt $filename => $expected', ({ filename, expected }) => {
expect(LangId.isBinaryFile(filename)).toBe(expected);
});
Expand Down
1 change: 1 addition & 0 deletions packages/cspell-lib/src/LanguageIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export const languageExtensionDefinitions: LanguageDefinitions = [
{ id: 'jar', extensions: ['.jar'], format: 'Binary' },
{ id: 'spv', extensions: ['.spv'], format: 'Binary', description: 'SPSS Output Document' },
{ id: 'mdb', extensions: ['.mdb'], format: 'Binary', description: 'Microsoft Access DB' },
{ id: 'webm', extensions: ['.webm'], format: 'Binary', description: 'WebM is an audiovisual media file format.' },
];

export type LanguageId = string;
Expand Down

0 comments on commit eeb9497

Please sign in to comment.