mirror of
				https://github.com/flynx/object.js.git
				synced 2025-10-30 19:10:11 +00:00 
			
		
		
		
	for doc and text now leading indent is not ignored...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									35eea57ab9
								
							
						
					
					
						commit
						a729bf85d6
					
				| @ -86,7 +86,10 @@ function(text, tab_size, leading_tabs){ | |||||||
| 	text = tab != '' ? | 	text = tab != '' ? | ||||||
| 		text.replace(/\t/g, tab) | 		text.replace(/\t/g, tab) | ||||||
| 		: text | 		: text | ||||||
| 	var lines = text.trim().split(/\n/) | 	var lines = text.trimEnd().split(/\n/) | ||||||
|  | 	// remove leading blank lines...	
 | ||||||
|  | 	while(lines[0].trim() == ''){ | ||||||
|  | 		lines.shift() } | ||||||
| 	// count common indent...
 | 	// count common indent...
 | ||||||
| 	var l = lines  | 	var l = lines  | ||||||
| 		.reduce(function(l, e, i){ | 		.reduce(function(l, e, i){ | ||||||
|  | |||||||
| @ -28,6 +28,6 @@ | |||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "c8": "^7.3.0", |     "c8": "^7.3.0", | ||||||
|     "colors": "^1.4.0", |     "colors": "^1.4.0", | ||||||
|     "ig-test": "^1.3.8" |     "ig-test": "^1.4.4" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user