Fix node name getting chopped off.
This commit is contained in:
		
							parent
							
								
									a4414369ce
								
							
						
					
					
						commit
						a4a83d047d
					
				| @ -254,11 +254,13 @@ fn compare_ast_node<'e, 's, 'w>( | ||||
|             let wasm_attribute_value = wasm_attributes_map.get(attribute_name); | ||||
|             let emacs_key = wasm_key_to_emacs_key(attribute_name); | ||||
|             let emacs_attribute_value = emacs_attributes_map.get(emacs_key.as_str()).map(|e| *e); | ||||
|             layer.extend(compare_optional_json_value( | ||||
|                 source, | ||||
|                 emacs_attribute_value, | ||||
|                 wasm_attribute_value, | ||||
|             )?)?; | ||||
|             let inner_layer = | ||||
|                 compare_optional_json_value(source, emacs_attribute_value, wasm_attribute_value)?; | ||||
|             if !inner_layer.name.is_empty() { | ||||
|                 layer.children.push(inner_layer); | ||||
|             } else { | ||||
|                 layer.extend(inner_layer)?; | ||||
|             } | ||||
|             result.children.push(layer); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @ -45,8 +45,6 @@ impl<'s> WasmDiffResult<'s> { | ||||
| 
 | ||||
|     pub fn print(&self, original_document: &str) -> Result<(), Box<dyn std::error::Error>> { | ||||
|         self.print_indented(0, original_document) | ||||
|         // println!("{:#?}", self);
 | ||||
|         // todo!()
 | ||||
|     } | ||||
| 
 | ||||
|     fn print_indented( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander