修复latex识别主文件错误的问题

This commit is contained in:
binary-husky 2023-09-14 17:51:41 +08:00
parent a1cc2f733c
commit a3f36668a8
2 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,7 @@ def find_main_tex_file(file_manifest, mode):
canidates_score.append(0)
with open(texf, 'r', encoding='utf8', errors='ignore') as f:
file_content = f.read()
file_content = rm_comments(file_content)
for uw in unexpected_words:
if uw in file_content:
canidates_score[-1] -= 1

View File

@ -109,6 +109,7 @@ class SparkRequestInstance():
code = data['header']['code']
if code != 0:
print(f'请求错误: {code}, {data}')
self.result_buf += str(data)
ws.close()
self.time_to_exit_event.set()
else: