help-beta: Stop asides from making a tight list loose.

A lot of our admonition declaration had an empty new line in the
beginning which was getting ported over in the conversion. This caused
the asides to unintentionally mark a tight list as loose which we do not
want.
This commit is contained in:
Shubham Padia
2025-07-30 09:18:18 +00:00
committed by Tim Abbott
parent df5669d546
commit 49e7e9dae8

View File

@@ -411,7 +411,11 @@ def convert_admonitions_to_asides(
admonition_content, post_admonition_content_text = detab(
post_admonition_declaration_text
)
admonition_content = indent(admonition_content, INDENT_SPACES)
# We strip newline since we add explicit newlines before
# and after the component in the conversion code that
# follows this. Extra blank lines in between the components
# will make a tight list loose, which we do not desire.
admonition_content = indent(admonition_content, INDENT_SPACES).strip("\n")
klass, title = get_admonition_class_and_title(match)
# We ignore the title obtained above in each of the if