diff --git a/misc/gen_blog_post_html.py b/misc/gen_blog_post_html.py index 7170696d5d09..2641ae1c466d 100644 --- a/misc/gen_blog_post_html.py +++ b/misc/gen_blog_post_html.py @@ -46,7 +46,7 @@ def format_code(h: str) -> str: indent = a[i].startswith(" ") if not indent: i += 1 - r.append("
")
+            r.append("
")
             while i < len(a) and (
                 (indent and a[i].startswith("    ")) or (not indent and not a[i].startswith("```"))
             ):
@@ -56,7 +56,7 @@ def format_code(h: str) -> str:
                     line = "    " + line
                 r.append(html.escape(line))
                 i += 1
-            r.append("
") + r.append("
") if not indent and a[i].startswith("```"): i += 1 else: @@ -76,7 +76,7 @@ def convert(src: str) -> str: h = re.sub(r"^## (Mypy [0-9.]+)", r"

\1 Released

", h, flags=re.MULTILINE) # Subheadings - h = re.sub(r"\n#### ([A-Z`].*)\n", r"\n

\1

\n", h) + h = re.sub(r"\n### ([A-Z`].*)\n", r"\n

\1

\n", h) # Sub-subheadings h = re.sub(r"\n\*\*([A-Z_`].*)\*\*\n", r"\n

\1

\n", h)