Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
realm_playground: Remove `generated_pygments_data` parameter for initialization function.
Lalit4a4d23a548a8
diff --git a/web/src/realm_playground.js b/web/src/realm_playground.jsindex b1068567fdf..32f5f3f9866 100644--- a/web/src/realm_playground.js+++ b/web/src/realm_playground.js@@ -27,7 +27,7 @@ export function get_playground_info_for_languages(lang) {return map_language_to_playground_info.get(lang);}-function sort_pygments_pretty_names_by_priority(generated_pygments_data, comparator_func) {+function sort_pygments_pretty_names_by_priority(comparator_func) {const priority_sorted_pygments_data = Object.keys(generated_pygments_data.langs).sort(comparator_func,);@@ -83,7 +83,7 @@ export function get_pygments_typeahead_list_for_settings(query) {return language_labels;}-export function initialize({playground_data, generated_pygments_data, pygments_comparator_func}) {+export function initialize({playground_data, pygments_comparator_func}) {update_playgrounds(playground_data);- sort_pygments_pretty_names_by_priority(generated_pygments_data, pygments_comparator_func);+ sort_pygments_pretty_names_by_priority(pygments_comparator_func);}diff --git a/web/src/ui_init.js b/web/src/ui_init.jsindex e8154442cd9..77f3262b530 100644--- a/web/src/ui_init.js+++ b/web/src/ui_init.js@@ -715,7 +715,6 @@ export function initialize_everything() {linkifiers.initialize(page_params.realm_linkifiers);realm_playground.initialize({playground_data: page_params.realm_playgrounds,- generated_pygments_data,pygments_comparator_func: typeahead_helper.compare_language,});compose.initialize();diff --git a/web/tests/realm_playground.test.js b/web/tests/realm_playground.test.jsindex 9ef6229bb96..a83aa0a8194 100644--- a/web/tests/realm_playground.test.js+++ b/web/tests/realm_playground.test.js@@ -30,7 +30,6 @@ run_test("get_pygments_typeahead_list_for_composebox", () => {];realm_playground.initialize({playground_data,- generated_pygments_data: pygments_data,pygments_comparator_func: typeahead_helper.compare_language,});@@ -70,7 +69,6 @@ run_test("get_pygments_typeahead_list_for_settings", () => {];realm_playground.initialize({playground_data,- generated_pygments_data: pygments_data,pygments_comparator_func: typeahead_helper.compare_language,});