Skip to content

Commit

Permalink
fix: article.TextNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo2011 committed Jan 30, 2024
1 parent 536243c commit ed9a198
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bilibili_api/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,9 @@ def __init__(self, text: str):

def markdown(self):
txt = self.text
txt = txt.replace("\t", " ")
txt = txt.replace(" ", " ")
txt = txt.replace(chr(160), " ")
special_chars = ["\\", "*", "$", "<", ">", "|"]
for c in special_chars:
txt = txt.replace(c, "\\" + c)
Expand Down

0 comments on commit ed9a198

Please sign in to comment.