Open
Description
I have a use case where I need the information of the target nodes in the EditScript. However, only the target node text is passed to the Update
objects. For example the code at code_diff/__init__.py:L200
is
if source_ast.type == target_ast.type and len(source_ast.children) == 0 and len(target_ast.children) == 0:
# Both nodes are tokens of the same type
# Only an update is required
return EditScript([Update(source_ast, target_ast.text)])
I suggest that the last line to be replaced with:
return EditScript([Update(source_ast, target_ast)])
Metadata
Metadata
Assignees
Labels
No labels