Even better code block detection
This commit is contained in:
		
							parent
							
								
									06769aba90
								
							
						
					
					
						commit
						67d572bd64
					
				| @ -484,7 +484,7 @@ class message(Gtk.Overlay): | ||||
|         self.content_children = [] | ||||
|         if text: | ||||
|             self.content_children = [] | ||||
|             code_block_pattern = re.compile(r'```(\w*)\n(.*?)\n\s*```', re.DOTALL) | ||||
|             code_block_pattern = re.compile(r'[```|`](\w*)\n(.*?)\n\s*[```|`]', re.DOTALL) | ||||
|             table_pattern = re.compile(r'((\r?\n){2}|^)([^\r\n]*\|[^\r\n]*(\r?\n)?)+(?=(\r?\n){2}|$)', re.MULTILINE) | ||||
|             bold_pattern = re.compile(r'\*\*(.*?)\*\*') #"**text**" | ||||
|             code_pattern = re.compile(r'`([^`\n]*?)`') #"`text`" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user