From b89b22e43eb7e821674e0022f4061442b9e29394 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Wed, 5 Feb 2020 00:13:46 +0200 Subject: vscode: yet another refactor commit --- editors/code/src/highlighting.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editors/code/src/highlighting.ts') diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index 66216e0fc..e90fb8acc 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts @@ -69,7 +69,7 @@ interface Decoration { // Based on this HSL-based color generator: https://gist.github.com/bendc/76c48ce53299e6078a76 function fancify(seed: string, shade: 'light' | 'dark') { - const random = randomU32Numbers(hashString(seed)) + const random = randomU32Numbers(hashString(seed)); const randomInt = (min: number, max: number) => { return Math.abs(random()) % (max - min + 1) + min; }; @@ -253,14 +253,14 @@ function randomU32Numbers(seed: number) { random ^= random >> 17; random ^= random << 5; random |= 0; - return random - } + return random; + }; } function hashString(str: string): number { let res = 0; for (let i = 0; i < str.length; ++i) { - const c = str.codePointAt(i)!!; + const c = str.codePointAt(i)!; res = (res * 31 + c) & ~0; } return res; -- cgit v1.2.3