mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-11-04 01:27:21 +01:00 
			
		
		
		
	Messages shouldn't wrap links, set defaults for text wrapper.
This commit is contained in:
		
							parent
							
								
									7e002ed2a2
								
							
						
					
					
						commit
						169392e519
					
				@ -436,9 +436,12 @@ class FormatParser(object):
 | 
			
		||||
        else:
 | 
			
		||||
            self.ungetChar(c)
 | 
			
		||||
 | 
			
		||||
def wrap(s, length):
 | 
			
		||||
def wrap(s, length, break_on_hyphens = False, break_long_words = False):
 | 
			
		||||
    processed = []
 | 
			
		||||
    chunks = textwrap.wrap(s, length)
 | 
			
		||||
    wrapper = textwrap.TextWrapper(width=length)
 | 
			
		||||
    wrapper.break_long_words = break_long_words
 | 
			
		||||
    wrapper.break_on_hyphens = break_on_hyphens
 | 
			
		||||
    chunks = wrapper.wrap(s)
 | 
			
		||||
    context = None
 | 
			
		||||
    for chunk in chunks:
 | 
			
		||||
        if context is not None:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user