From a23d928662fd74622e4d30eb6797efd6f330f3d3 Mon Sep 17 00:00:00 2001 From: Shubham Padia Date: Mon, 26 May 2025 14:27:10 +0000 Subject: [PATCH] help-beta: Indent the content inside Asides or KeyboardTip. MDX files were getting harder to read without proper indentation. --- tools/convert-help-center-docs-to-mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/convert-help-center-docs-to-mdx b/tools/convert-help-center-docs-to-mdx index 3d8c29df19..523970c7b6 100755 --- a/tools/convert-help-center-docs-to-mdx +++ b/tools/convert-help-center-docs-to-mdx @@ -4,6 +4,7 @@ import os import re import shutil import sys +from textwrap import indent import django from django.template import engines @@ -20,6 +21,8 @@ setup_path() os.environ["DJANGO_SETTINGS_MODULE"] = "zproject.settings" django.setup() +INDENT_SPACES = " " + def replace_emoticon_translation_table(markdown_string: str, import_statement_set: set[str]) -> str: """ @@ -195,6 +198,7 @@ def convert_admonitions_to_asides( admonition_content, post_admonition_content_text = detab( post_admonition_declaration_text ) + admonition_content = indent(admonition_content, INDENT_SPACES) klass, title = get_admonition_class_and_title(match) # We ignore the title obtained above in each of the if