From 99b55b712b4806d2aa4259feefcf5b588687d07c Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Mon, 20 Aug 2018 21:11:00 -0700 Subject: [PATCH] user docs: Shorten instructions when using relative settings links. --- zerver/lib/bugdown/help_settings_links.py | 10 +++------- zerver/tests/test_docs.py | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/zerver/lib/bugdown/help_settings_links.py b/zerver/lib/bugdown/help_settings_links.py index 23c0edbe4c..95da5dc7da 100644 --- a/zerver/lib/bugdown/help_settings_links.py +++ b/zerver/lib/bugdown/help_settings_links.py @@ -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) diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index 9587bfc313..8abfcbc438 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -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 Display settings', str(result.content)) + self.assertIn('Go to Display settings', str(result.content)) self.assertEqual(result.status_code, 200) with self.settings(ROOT_DOMAIN_LANDING_PAGE=True):