mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-30 02:20:08 +00:00 
			
		
		
		
	minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									934cae33f3
								
							
						
					
					
						commit
						8afe54e69e
					
				| @ -1808,17 +1808,11 @@ var Outline = { | |||||||
| 							&& (res[attr] = true) } | 							&& (res[attr] = true) } | ||||||
| 					return res }, {})), | 					return res }, {})), | ||||||
| 			...(deep ?  | 			...(deep ?  | ||||||
| 				//{children: this.json(elem)}
 | 				{children: this.data([...elem.lastChild.children])} | ||||||
| 				{children: [...elem.lastChild.children] |  | ||||||
| 					.map(function(elem){  |  | ||||||
| 						return that.data(elem) })} |  | ||||||
| 				: {}), | 				: {}), | ||||||
| 		} }, | 		} }, | ||||||
| 	// XXX do we need both this and data???
 | 	// Same as .data(..) but by default returns the root nodes.
 | ||||||
| 	// 		...the only differences are:
 | 	// NOTE: this always returns an array
 | ||||||
| 	// 			- the default behavior node vs all
 |  | ||||||
| 	// 			- .json() always returns an array
 |  | ||||||
| 	// XXX should this always return a list???
 |  | ||||||
| 	json: function(node='all'){ | 	json: function(node='all'){ | ||||||
| 		return [this.data(...( | 		return [this.data(...( | ||||||
| 				arguments.length == 0 ?  | 				arguments.length == 0 ?  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user