Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
minor: Format comments to be sentences and fix typo.
Rohitt Vashishtha5d1365b26555
diff --git a/frontend_tests/node_tests/rendered_markdown.js b/frontend_tests/node_tests/rendered_markdown.jsindex 0971f3bad89..6c91f52edb2 100644--- a/frontend_tests/node_tests/rendered_markdown.js+++ b/frontend_tests/node_tests/rendered_markdown.js@@ -223,7 +223,7 @@ run_test('spoiler-header', () => {const $header = $.create('div.spoiler-header');$content.set_find_results('div.spoiler-header', $array([$header]));- // Test that button gets appened to a spoiler header+ // Test that the show/hide button gets added to a spoiler header.const label = 'My Spoiler Header';const toggle_button_html = '<span class="spoiler-button" aria-expanded="false"><span class="spoiler-arrow"></span></span>';$header.html(label);@@ -237,7 +237,7 @@ run_test('spoiler-header-empty-fill', () => {const $header = $.create('div.spoiler-header');$content.set_find_results('div.spoiler-header', $array([$header]));- // Test that an empty header gets the default text applied (through i18n filter)+ // Test that an empty header gets the default text applied (through i18n filter).const toggle_button_html = '<span class="spoiler-button" aria-expanded="false"><span class="spoiler-arrow"></span></span>';$header.html('');rm.update_elements($content);diff --git a/static/js/rendered_markdown.js b/static/js/rendered_markdown.jsindex b573cd9cd36..c2355c39964 100644--- a/static/js/rendered_markdown.js+++ b/static/js/rendered_markdown.js@@ -170,8 +170,8 @@ exports.update_elements = (content) => {});content.find('div.spoiler-header').each(function () {- // If a spoiler block has no header content, it should have a default header- // We do this client side to allow for i18n by the client+ // If a spoiler block has no header content, it should have a default header.+ // We do this client side to allow for i18n by the client.if ($.trim($(this).html()).length === 0) {$(this).append(`<p>${i18n.t('Spoiler')}</p>`);}