Merge pull request #112 from pomber/fix-bat-files

Support .bat
This commit is contained in:
Rodrigo Pombo 2019-03-01 13:20:15 -03:00 committed by GitHub
commit 6550ab37f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ const filenameRegex = [
{ lang: "scss", regex: /\.scss$/i },
{ lang: "ini", regex: /\.ini$|.editorconfig$/i },
{ lang: "markup", regex: /\.xml$|\.html$|\.htm$|\.svg$|\.mathml$/i },
{ lang: "bat", regex: /\.bat$/i },
{ lang: "batch", regex: /\.bat$/i },
{ lang: "clojure", regex: /\.clj$/i },
{ lang: "coffeescript", regex: /\.coffee$/i },
{ lang: "cpp", regex: /\.cpp$|\.cc$/i },

View File

@ -110,7 +110,7 @@ describe("Can detect language", () => {
});
test("bat", () => {
expect(getLanguage("my-file.bat")).toBe("bat");
expect(getLanguage("my-file.bat")).toBe("batch");
});
test("clojure", () => {

View File

@ -10,7 +10,7 @@ export default function Scroller({
top,
setTop
}) {
const ref = React.useRef(null);
const ref = React.useRef();
const height = useHeight(ref);
const children = useChildren({