mirror of
				https://gitlab.com/luk3yx/minetest-formspec_ast.git
				synced 2025-10-30 23:33:06 +01:00 
			
		
		
		
	Fix size[].
This commit is contained in:
		
							parent
							
								
									c551fc2b8e
								
							
						
					
					
						commit
						70683baae5
					
				
							
								
								
									
										2
									
								
								core.lua
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								core.lua
									
									
									
									
									
								
							| @ -80,7 +80,6 @@ local function raw_parse(spec) | ||||
|                 i = i .. char | ||||
|             end | ||||
|         end | ||||
|         if i ~= '' or #elem > 1 then | ||||
|         if #inner > 0 then | ||||
|             table.insert(inner, i) | ||||
|             table.insert(elem, inner) | ||||
| @ -88,7 +87,6 @@ local function raw_parse(spec) | ||||
|         else | ||||
|             table.insert(elem, i) | ||||
|         end | ||||
|         end | ||||
| 
 | ||||
|         table.insert(res, elem) | ||||
|     end | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -93,6 +93,12 @@ def _bgcolor_hook(params): | ||||
|     for i in range(1, len(params)): | ||||
|         yield params[:-i] | ||||
| 
 | ||||
| # Fix size | ||||
| @hook('size') | ||||
| def _size_hook(params): | ||||
|     yield params | ||||
|     yield [[('w', 'number'), ('h', 'number')]] | ||||
| 
 | ||||
| def _raw_parse(data): | ||||
|     data = data.split('\nElements\n--------\n', 1)[-1].split('\n----', 1)[0] | ||||
|     for line in data.split('\n'): | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user