eslint: Fix no-jquery/no-append-html errors that need test changes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-04-03 15:53:08 -07:00
committed by Tim Abbott
parent 382af5f79f
commit 8fb1117cef
21 changed files with 158 additions and 133 deletions

View File

@@ -65,7 +65,7 @@ export function adjust_mac_kbd_tags(kbd_elem_class: string): void {
let key_text = $(this).text();
if (fn_shortcuts.has(key_text)) {
$(this).before("<kbd>Fn</kbd> + ");
$(this).before($("<kbd>").text("Fn"), $("<span>").text(" + ").contents());
$(this).addClass("arrow-key");
}
@@ -88,7 +88,7 @@ export function adjust_mac_kbd_tags(kbd_elem_class: string): void {
const following_key = $(this).attr("data-mac-following-key");
if (following_key !== undefined) {
const $kbd_elem = $("<kbd>").text(following_key);
$(this).after(" + ", $kbd_elem);
$(this).after($("<span>").text(" + ").contents(), $kbd_elem);
}
});
}