Resolve issue with docs content spacing (#1953) (#1954)

This commit is contained in:
daveoconnor
2025-10-08 13:51:35 -07:00
committed by GitHub
parent 086bf942c0
commit 88d5fcff59
2 changed files with 3 additions and 3 deletions

View File

@@ -180,7 +180,7 @@ def modernize_legacy_page(
if soup.html is None:
# Not an HTML file we care about
return soup.prettify(formatter="html")
return str(soup)
# Remove CSS classes that produce visual harm
for tag_name, tag_attrs in REMOVE_CSS_CLASSES:
@@ -231,7 +231,7 @@ def modernize_legacy_page(
# Remove tags from the base template
soup = hide_tags(soup, HIDE_TAGS_BASE)
return soup.prettify(formatter="html")
return str(soup)
def minimize_uris(content: str) -> str:

View File

@@ -526,7 +526,7 @@ class DocLibsTemplateView(BaseStaticContentTemplateView):
soup = self._required_modernization_changes(soup)
context = {
"content": str(soup.prettify()),
"content": str(soup),
"canonical_uri": canonical_uri if canonical_uri != req_uri else None,
}
template_name = "original_docs.html"