修复关于abstract的搜索
This commit is contained in:
		
							parent
							
								
									cbcb98ef6a
								
							
						
					
					
						commit
						9a5a509dd9
					
				@ -424,7 +424,9 @@ class LatexPaperSplit():
 | 
				
			|||||||
        if mode == 'translate_zh':
 | 
					        if mode == 'translate_zh':
 | 
				
			||||||
            pattern = re.compile(r'\\begin\{abstract\}.*\n')
 | 
					            pattern = re.compile(r'\\begin\{abstract\}.*\n')
 | 
				
			||||||
            match = pattern.search(result_string)
 | 
					            match = pattern.search(result_string)
 | 
				
			||||||
            assert match is not None, "Cannot find paper abstract section!"
 | 
					            if not match:
 | 
				
			||||||
 | 
					                pattern = re.compile(r'\\abstract\{')
 | 
				
			||||||
 | 
					                match = pattern.search(result_string)
 | 
				
			||||||
            position = match.end()
 | 
					            position = match.end()
 | 
				
			||||||
            result_string = result_string[:position] + self.msg + msg + self.msg_declare + result_string[position:]
 | 
					            result_string = result_string[:position] + self.msg + msg + self.msg_declare + result_string[position:]
 | 
				
			||||||
        return result_string
 | 
					        return result_string
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user