Skip to content

Commit

Permalink
修复 bing latex 显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed May 30, 2023
1 parent f9a9085 commit 149655a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions md2tgmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def escape(text):
def bingescape(text):
text = re.sub(r"\\\\", '@@@', text)
text = re.sub(r"\\", r"\\\\", text)
text = re.sub(r"@@@", '\\\\', text)
text = re.sub(r"\@{3}", r"\\\\", text)
text = re.sub(r"_", '\_', text)
text = re.sub(r"\*{2}(.*?)\*{2}", '@@@\\1@@@', text)
text = re.sub(r"\n\*\s", '\n\n• ', text)
Expand Down Expand Up @@ -134,10 +134,14 @@ def bingescape(text):
```
Cxy = abs (Pxy)**2/ (Pxx*Pyy)
\\begin {equation}
\pi
\\end {equation*}
'''

if __name__ == '__main__':
import os
os.system('clear')
text = escape(text)
text = bingescape(text)
print(text)

0 comments on commit 149655a

Please sign in to comment.