Skip to content

Commit

Permalink
Remove regex compile from beautifulsoup search
Browse files Browse the repository at this point in the history
  • Loading branch information
petesfrench committed Feb 21, 2023
1 parent 724ee20 commit d7923a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion canonicalwebteam/discourse/parsers/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def _generate_headings_map(self, soup):
current_list = headings_map
previous_tag = None

headings = soup.findAll(re.compile("^h[2-3]$"))
headings = soup.find_all(["h2","h3"])

for heading in headings:
current_tag = re.findall(r"\d", heading.name)[0]
Expand Down

0 comments on commit d7923a9

Please sign in to comment.