Skip to content

Commit

Permalink
fix: readd the Title to pep headers
Browse files Browse the repository at this point in the history
this was removed in python/peps#2532
  • Loading branch information
onerandomusername committed Apr 20, 2022
1 parent 5e334c7 commit ba93f4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions monty/exts/info/pep.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def parse(self, soup: BeautifulSoup) -> dict[str, str]:
for dt in dl.find_all("dt"):
results[dt.text] = dt.find_next_sibling("dd").text

# readd title to headers
# this was removed from the headers in python/peps#2532
h1 = soup.find("h1", attrs={"class": "page-title"})
results["Title"] = h1.text.split("-", 1)[-1]

return results


Expand Down

0 comments on commit ba93f4a

Please sign in to comment.