From 725639118a84fc78a1bdb9c49538a941899eee58 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:53:50 -0800 Subject: [PATCH] UI: Use a tab length of 2 for lists (rather than 4) --- modules/html_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/html_generator.py b/modules/html_generator.py index 40a56731..8160f8b6 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -195,7 +195,7 @@ def convert_to_markdown(string): result = re.sub(list_item_pattern, r'\g<1> ' + delete_str, result) # Convert to HTML using markdown - html_output = markdown.markdown(result, extensions=['fenced_code', 'tables']) + html_output = markdown.markdown(result, extensions=['fenced_code', 'tables'], tab_length=2) # Remove the delete string from the HTML output pos = html_output.rfind(delete_str) @@ -203,7 +203,7 @@ def convert_to_markdown(string): html_output = html_output[:pos] + html_output[pos + len(delete_str):] else: # Convert to HTML using markdown - html_output = markdown.markdown(result, extensions=['fenced_code', 'tables']) + html_output = markdown.markdown(result, extensions=['fenced_code', 'tables'], tab_length=2) # Unescape code blocks pattern = re.compile(r']*>(.*?)', re.DOTALL)