-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/fix-crt-indicate-typos
- Loading branch information
Showing
20 changed files
with
202 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -606,6 +606,7 @@ | |
"code_lua", | ||
"code_luau", | ||
"code_latex", | ||
"code_typst", | ||
"code_matlab", | ||
"code_sql", | ||
"code_perl", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,6 +339,7 @@ | |
,"code_lua" | ||
,"code_luau" | ||
,"code_latex" | ||
,"code_typst" | ||
,"code_matlab" | ||
,"code_sql" | ||
,"code_perl" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "code_typst", | ||
"noLazyMode": true, | ||
"ligatures": false, | ||
"words": [ | ||
"#use", | ||
"#set par(justify: true)", | ||
"#show", | ||
"#set", | ||
"#let", | ||
"#par", | ||
"#figure", | ||
"#underline", | ||
"#smallcaps", | ||
"#grid", | ||
"#box", | ||
"#place", | ||
"#import", | ||
"#link", | ||
"#lorem(50)", | ||
"let", | ||
"#{", | ||
"}", | ||
"#(", | ||
")", | ||
"#[", | ||
"]", | ||
"$", | ||
"@", | ||
"*", | ||
"-", | ||
"_", | ||
"\\", | ||
"/", | ||
"//", | ||
"floor(x)", | ||
"cal(A)", | ||
"NN", | ||
"RR", | ||
">", | ||
"<", | ||
">=", | ||
"gt.eq.not", | ||
"sum_(k=1)^oo", | ||
"pi", | ||
"&=", | ||
"vec", | ||
"mat" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2039,7 +2039,6 @@ | |
"Bóg", | ||
"wybrać", | ||
"zjawisko", | ||
"abugida", | ||
"według", | ||
"kara", | ||
"czas", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as Util from "../src/util"; | ||
|
||
describe("util", () => { | ||
describe("stringToFunboxNames", () => { | ||
it("should get single funbox", () => { | ||
expect(Util.stringToFunboxNames("58008")).toEqual(["58008"]); | ||
}); | ||
it("should fail for unknown funbox name", () => { | ||
expect(() => Util.stringToFunboxNames("unknown")).toThrowError( | ||
new Error("Invalid funbox name: unknown") | ||
); | ||
}); | ||
it("should split multiple funboxes by hash", () => { | ||
expect(Util.stringToFunboxNames("58008#choo_choo")).toEqual([ | ||
"58008", | ||
"choo_choo", | ||
]); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { parseWithSchema } from "../src/json"; | ||
import { z } from "zod"; | ||
|
||
describe("json", () => { | ||
describe("parseWithSchema", () => { | ||
const schema = z.object({ | ||
test: z.boolean().optional(), | ||
name: z.string(), | ||
nested: z.object({ foo: z.string() }).strict().optional(), | ||
}); | ||
it("should parse", () => { | ||
const json = `{ | ||
"test":true, | ||
"name":"bob", | ||
"unknown":"unknown", | ||
"nested":{ | ||
"foo":"bar" | ||
} | ||
}`; | ||
|
||
expect(parseWithSchema(json, schema)).toStrictEqual({ | ||
test: true, | ||
name: "bob", | ||
nested: { foo: "bar" }, | ||
}); | ||
}); | ||
it("should fail with invalid schema", () => { | ||
const json = `{ | ||
"test":"yes", | ||
"nested":{ | ||
"foo":1 | ||
} | ||
}`; | ||
|
||
expect(() => parseWithSchema(json, schema)).toThrowError( | ||
new Error( | ||
`"test" Expected boolean, received string\n"name" Required\n"nested.foo" Expected string, received number` | ||
) | ||
); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.