Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
pygments_data: Remove undefined option for lang value.
Evy Kassirer68e86b0905c6
diff --git a/web/src/pygments_data.ts b/web/src/pygments_data.tsindex c41b457702d..2613fb253d1 100644--- a/web/src/pygments_data.ts+++ b/web/src/pygments_data.ts@@ -1,7 +1,7 @@import generated_pygments_data from "../generated/pygments_data.json";type PygmentsLanguage = {priority: number; pretty_name: string};-export let langs: Record<string, PygmentsLanguage | undefined> = generated_pygments_data.langs;+export let langs: Record<string, PygmentsLanguage> = generated_pygments_data.langs;export function rewire_langs(value: typeof langs): void {langs = value;diff --git a/web/src/realm_playground.ts b/web/src/realm_playground.tsindex 4bfa6b3e83d..800bd15e5f1 100644--- a/web/src/realm_playground.ts+++ b/web/src/realm_playground.ts@@ -1,4 +1,3 @@-import assert from "minimalistic-assert";import type * as z from "zod/mini";import * as typeahead from "../shared/src/typeahead.ts";@@ -42,7 +41,6 @@ function sort_pygments_pretty_names_by_priority(comparator_func(a, b),);for (const [alias, data] of priority_sorted_pygments_data) {- assert(data !== undefined);const pretty_name = data.pretty_name;// JS Map remembers the original order of insertion of keys.if (map_pygments_pretty_name_to_aliases.has(pretty_name)) {