mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Update html.py
This commit is contained in:
parent
b660115a60
commit
3eda82d0af
1 changed files with 2 additions and 1 deletions
|
|
@ -117,7 +117,8 @@ class HTML:
|
||||||
self.client = client
|
self.client = client
|
||||||
|
|
||||||
async def parse(self, text: str):
|
async def parse(self, text: str):
|
||||||
# Strip whitespace characters from the end of the message, but preserve closing tags
|
# Strip whitespaces from the beginning and the end, but preserve closing tags
|
||||||
|
text = re.sub(r"^\s*(<[\w<>=\s\"]*>)\s*", r"\1", text)
|
||||||
text = re.sub(r"\s*(</[\w</>]*>)\s*$", r"\1", text)
|
text = re.sub(r"\s*(</[\w</>]*>)\s*$", r"\1", text)
|
||||||
|
|
||||||
parser = Parser(self.client)
|
parser = Parser(self.client)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue