Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
Fix math formula detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadow15510 committed Feb 22, 2021
1 parent 87a3c2b commit 6ec84fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/wikibot_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from libs.weather_lib import get_weather

def math_formula_detection(summary, source_code):
for math_element in BeautifulSoup(source_code).find_all("span", {"class": "mwe-math-element"}):
for math_element in BeautifulSoup(source_code, features="html5lib").find_all("span", {"class": "mwe-math-element"}):
summary = summary.replace(math_element.text[:-3], "[ *formula* ]")

return summary
Expand Down

0 comments on commit 6ec84fc

Please sign in to comment.