mirror of https://github.com/zulip/zulip.git
minor: Format comments to be sentences and fix typo.
This commit is contained in:
parent
0b510cd66d
commit
5d1365b265
|
@ -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);
|
||||
|
|
|
@ -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>`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue