Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
markdown/tabbed_sections: Don't set tab label as 'None' in case of no tabs.
Pradyumna Sinha78692e9c1434
diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.pyindex 1dac6da1ea8..ce7c866a526 100644--- a/zerver/lib/markdown/tabbed_sections.py+++ b/zerver/lib/markdown/tabbed_sections.py@@ -73,6 +73,7 @@ TAB_SECTION_LABELS = {"not-stream": "From other views","via-recent-topics": "Via recent topics","via-left-sidebar": "Via left sidebar",+ "instructions-for-all-platforms": "Instructions for all platforms",}@@ -97,7 +98,10 @@ class TabbedSectionsPreprocessor(Preprocessor):else:tab_class = "no-tabs"tab_section["tabs"] = [- {"tab_name": "null_tab", "start": tab_section["start_tabs_index"]}+ {+ "tab_name": "instructions-for-all-platforms",+ "start": tab_section["start_tabs_index"],+ }]nav_bar = self.generate_nav_bar(tab_section)content_blocks = self.generate_content_blocks(tab_section, lines)diff --git a/zerver/tests/test_templates.py b/zerver/tests/test_templates.pyindex 1ee3cdc8827..851e9d27dbe 100644--- a/zerver/tests/test_templates.py+++ b/zerver/tests/test_templates.py@@ -76,10 +76,10 @@ header<p><div class="code-section no-tabs" markdown="1"><ul class="nav">- <li data-language="null_tab" tabindex="0">None</li>+ <li data-language="instructions-for-all-platforms" tabindex="0">Instructions for all platforms</li></ul><div class="blocks">- <div data-language="null_tab" markdown="1"></p>+ <div data-language="instructions-for-all-platforms" markdown="1"></p><p>Instructions for all platforms</p><p></div></div>