Merge pull request #38 from yershalom/master

Add kotlin to language-detector
This commit is contained in:
Rodrigo Pombo 2019-02-07 12:23:53 -03:00 committed by GitHub
commit c65994da6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,7 @@ const filenameRegex = [
{ lang: "handlebars", regex: /\.hbs$/i },
{ lang: "haskell", regex: /\.hs$/i },
{ lang: "java", regex: /\.java$/i },
{ lang: "kotlin", regex: /\.kt$/i },
{ lang: "lua", regex: /\.lua$/i },
{ lang: "markdown", regex: /\.md$/i },
{ lang: "msdax", regex: /\.msdax$/i },

View File

@ -146,6 +146,10 @@ describe("Can detect language", () => {
expect(getLanguage("my-file.java")).toBe("java");
});
test("kotlin", () => {
expect(getLanguage("my-file.kt")).toBe("kotlin");
});
test("lua", () => {
expect(getLanguage("my-file.lua")).toBe("lua");
});