mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
eslint: Fix unicorn/no-array-push-push.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
2e501c8667
commit
1e7347349c
@@ -1000,12 +1000,10 @@ run_test("misc", () => {
|
|||||||
settings_account.update_email_change_display();
|
settings_account.update_email_change_display();
|
||||||
assert(!$("#change_email .button").prop("disabled"));
|
assert(!$("#change_email .button").prop("disabled"));
|
||||||
|
|
||||||
stream_data.get_streams_for_settings_page = () => {
|
stream_data.get_streams_for_settings_page = () => [
|
||||||
const arr = [];
|
{name: "some_stream", stream_id: 75},
|
||||||
arr.push({name: "some_stream", stream_id: 75});
|
{name: "some_stream", stream_id: 42},
|
||||||
arr.push({name: "some_stream", stream_id: 42});
|
];
|
||||||
return arr;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Set stubs for dropdown_list_widget:
|
// Set stubs for dropdown_list_widget:
|
||||||
const widget_settings = [
|
const widget_settings = [
|
||||||
|
|||||||
@@ -81,16 +81,17 @@ function wrap_tex(tex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wrap_spoiler(header, text, stash_func) {
|
function wrap_spoiler(header, text, stash_func) {
|
||||||
const output = [];
|
|
||||||
const header_div_open_html = '<div class="spoiler-block"><div class="spoiler-header">';
|
const header_div_open_html = '<div class="spoiler-block"><div class="spoiler-header">';
|
||||||
const end_header_start_content_html = '</div><div class="spoiler-content" aria-hidden="true">';
|
const end_header_start_content_html = '</div><div class="spoiler-content" aria-hidden="true">';
|
||||||
const footer_html = "</div></div>";
|
const footer_html = "</div></div>";
|
||||||
|
|
||||||
output.push(stash_func(header_div_open_html));
|
const output = [
|
||||||
output.push(header);
|
stash_func(header_div_open_html),
|
||||||
output.push(stash_func(end_header_start_content_html));
|
header,
|
||||||
output.push(text);
|
stash_func(end_header_start_content_html),
|
||||||
output.push(stash_func(footer_html));
|
text,
|
||||||
|
stash_func(footer_html),
|
||||||
|
];
|
||||||
return output.join("\n\n");
|
return output.join("\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,9 +122,7 @@ export function process_fenced_code(content) {
|
|||||||
|
|
||||||
done() {
|
done() {
|
||||||
const text = wrap_quote(lines.join("\n"));
|
const text = wrap_quote(lines.join("\n"));
|
||||||
output_lines.push("");
|
output_lines.push("", text, "");
|
||||||
output_lines.push(text);
|
|
||||||
output_lines.push("");
|
|
||||||
handler_stack.pop();
|
handler_stack.pop();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -142,9 +141,7 @@ export function process_fenced_code(content) {
|
|||||||
done() {
|
done() {
|
||||||
const text = wrap_tex(lines.join("\n"));
|
const text = wrap_tex(lines.join("\n"));
|
||||||
const placeholder = stash_func(text, true);
|
const placeholder = stash_func(text, true);
|
||||||
output_lines.push("");
|
output_lines.push("", placeholder, "");
|
||||||
output_lines.push(placeholder);
|
|
||||||
output_lines.push("");
|
|
||||||
handler_stack.pop();
|
handler_stack.pop();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -162,9 +159,7 @@ export function process_fenced_code(content) {
|
|||||||
|
|
||||||
done() {
|
done() {
|
||||||
const text = wrap_spoiler(header, lines.join("\n"), stash_func);
|
const text = wrap_spoiler(header, lines.join("\n"), stash_func);
|
||||||
output_lines.push("");
|
output_lines.push("", text, "");
|
||||||
output_lines.push(text);
|
|
||||||
output_lines.push("");
|
|
||||||
handler_stack.pop();
|
handler_stack.pop();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -183,9 +178,7 @@ export function process_fenced_code(content) {
|
|||||||
const text = wrap_code(lines.join("\n"), lang);
|
const text = wrap_code(lines.join("\n"), lang);
|
||||||
// insert safe HTML that is passed through the parsing
|
// insert safe HTML that is passed through the parsing
|
||||||
const placeholder = stash_func(text, true);
|
const placeholder = stash_func(text, true);
|
||||||
output_lines.push("");
|
output_lines.push("", placeholder, "");
|
||||||
output_lines.push(placeholder);
|
|
||||||
output_lines.push("");
|
|
||||||
handler_stack.pop();
|
handler_stack.pop();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user