"vscode:/vscode.git/clone" did not exist on "97ebb11c60232b09b139981c8ec63e545e8cffa0"
Commit a392f445 authored by myhloli's avatar myhloli
Browse files

fix: remove trailing backslashes from strings in modeling_unimernet.py

parent d4f958a9
...@@ -374,6 +374,10 @@ def latex_rm_whitespace(s: str): ...@@ -374,6 +374,10 @@ def latex_rm_whitespace(s: str):
# \qquad后补空格 # \qquad后补空格
s = QQUAD_PATTERN.sub(r'\\qquad ', s) s = QQUAD_PATTERN.sub(r'\\qquad ', s)
# 如果字符串以反斜杠结尾,去掉最后的反斜杠
while s.endswith('\\'):
s = s[:-1]
return s return s
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment