mirror of https://github.com/zulip/zulip.git
user docs: Shorten instructions when using relative settings links.
This commit is contained in:
parent
36d495736a
commit
99b55b712b
|
@ -97,13 +97,9 @@ class Setting(Preprocessor):
|
|||
setting_name = link_mapping[setting_identifier][1]
|
||||
setting_link = link_mapping[setting_identifier][2]
|
||||
if relative_settings_links:
|
||||
setting_reference = "[%s](%s)" % (setting_name, setting_link)
|
||||
else:
|
||||
setting_reference = "**%s**" % (setting_name,)
|
||||
instructions = settings_markdown % {'setting_type_name': setting_type_name,
|
||||
'setting_reference': setting_reference}
|
||||
return instructions
|
||||
|
||||
return "1. Go to [%s](%s)." % (setting_name, setting_link)
|
||||
return settings_markdown % {'setting_type_name': setting_type_name,
|
||||
'setting_reference': "**%s**" % (setting_name,)}
|
||||
|
||||
def makeExtension(*args: Any, **kwargs: Any) -> SettingHelpExtension:
|
||||
return SettingHelpExtension(*args, **kwargs)
|
||||
|
|
|
@ -175,7 +175,7 @@ class HelpTest(ZulipTestCase):
|
|||
|
||||
def test_html_settings_links_help_docs(self) -> None:
|
||||
result = self.client_get('/help/change-the-time-format')
|
||||
self.assertIn('click <a href="/#settings/display-settings">Display settings</a>', str(result.content))
|
||||
self.assertIn('Go to <a href="/#settings/display-settings">Display settings</a>', str(result.content))
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
||||
with self.settings(ROOT_DOMAIN_LANDING_PAGE=True):
|
||||
|
|
Loading…
Reference in New Issue