mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/streaka/colors.js
This commit is contained in:
		
						commit
						dfe6290c88
					
				| @ -105,10 +105,7 @@ function applyStyle() { | ||||
|     return str; | ||||
|   } | ||||
| 
 | ||||
|   var newLinesPresent = false; | ||||
|   if(str.indexOf('\n') != -1){ | ||||
|     newLinesPresent = true; | ||||
|   } | ||||
|   var newLinesPresent = str.indexOf('\n') != -1; | ||||
| 
 | ||||
|   var nestedStyles = this._styles; | ||||
| 
 | ||||
| @ -116,7 +113,7 @@ function applyStyle() { | ||||
|   while (i--) { | ||||
|     var code = ansiStyles[nestedStyles[i]]; | ||||
|     str = code.open + str.replace(code.closeRe, code.open) + code.close; | ||||
|     if(newLinesPresent){ | ||||
|     if (newLinesPresent){ | ||||
|       str = str.replace(newLineRegex, code.close + '\n' + code.open); | ||||
|     } | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user