修复latex识别主文件错误的问题
This commit is contained in:
		
							parent
							
								
									a1cc2f733c
								
							
						
					
					
						commit
						a3f36668a8
					
				@ -256,6 +256,7 @@ def find_main_tex_file(file_manifest, mode):
 | 
				
			|||||||
            canidates_score.append(0)
 | 
					            canidates_score.append(0)
 | 
				
			||||||
            with open(texf, 'r', encoding='utf8', errors='ignore') as f:
 | 
					            with open(texf, 'r', encoding='utf8', errors='ignore') as f:
 | 
				
			||||||
                file_content = f.read()
 | 
					                file_content = f.read()
 | 
				
			||||||
 | 
					                file_content = rm_comments(file_content)
 | 
				
			||||||
            for uw in unexpected_words:
 | 
					            for uw in unexpected_words:
 | 
				
			||||||
                if uw in file_content:
 | 
					                if uw in file_content:
 | 
				
			||||||
                    canidates_score[-1] -= 1
 | 
					                    canidates_score[-1] -= 1
 | 
				
			||||||
 | 
				
			|||||||
@ -109,6 +109,7 @@ class SparkRequestInstance():
 | 
				
			|||||||
            code = data['header']['code']
 | 
					            code = data['header']['code']
 | 
				
			||||||
            if code != 0:
 | 
					            if code != 0:
 | 
				
			||||||
                print(f'请求错误: {code}, {data}')
 | 
					                print(f'请求错误: {code}, {data}')
 | 
				
			||||||
 | 
					                self.result_buf += str(data)
 | 
				
			||||||
                ws.close()
 | 
					                ws.close()
 | 
				
			||||||
                self.time_to_exit_event.set()
 | 
					                self.time_to_exit_event.set()
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user