Title: The target node information is not available in update operation · Issue #3 · cedricrupb/code_diff · GitHub
Open Graph Title: The target node information is not available in update operation · Issue #3 · cedricrupb/code_diff
X Title: The target node information is not available in update operation · Issue #3 · cedricrupb/code_diff
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_...
Open Graph 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__....
X 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__....
Opengraph URL: https://github.com/cedricrupb/code_diff/issues/3
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The target node information is not available in update operation","articleBody":"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`](https://github.com/cedricrupb/code_diff/blob/main/code_diff/__init__.py#L200) is\r\n```py\r\nif source_ast.type == target_ast.type and len(source_ast.children) == 0 and len(target_ast.children) == 0:\r\n # Both nodes are tokens of the same type \r\n # Only an update is required\r\n return EditScript([Update(source_ast, target_ast.text)])\r\n```\r\n\r\nI suggest that the last line to be replaced with:\r\n```py\r\nreturn EditScript([Update(source_ast, target_ast)])\r\n```\r\n\r\n","author":{"url":"https://github.com/mohayemin","@type":"Person","name":"mohayemin"},"datePublished":"2023-11-27T23:10:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3/code_diff/issues/3"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e4160340-f89e-b367-9f18-2e306c932a82 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDA6:1273CB:97E3F5:CF8C17:698DB631 |
| html-safe-nonce | 2833d7e494d7ef89e466e3b73b51b239364c858f6fac97716b7edbf64a3ca087 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREE2OjEyNzNDQjo5N0UzRjU6Q0Y4QzE3OjY5OERCNjMxIiwidmlzaXRvcl9pZCI6IjEyMzU5NzIyNTgxODgzNDI4MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4f84327da9dfebc62009ecbc92ac23e2ea8df421e23e2d48f197c4a7f82478d4 |
| hovercard-subject-tag | issue:2013285459 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cedricrupb/code_diff/3/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d4f0237d6d859ca1a86fcae515c575c32d470c46736e1776b382a3c8dd81830/cedricrupb/code_diff/issues/3 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d4f0237d6d859ca1a86fcae515c575c32d470c46736e1776b382a3c8dd81830/cedricrupb/code_diff/issues/3 |
| og:image:alt | 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__.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mohayemin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2457fd9a1b17ca7f38c3c2653895ccb2e0dd04f18f77446a21354e9bc4b7902f |
| turbo-cache-control | no-preview |
| go-import | github.com/cedricrupb/code_diff git https://github.com/cedricrupb/code_diff.git |
| octolytics-dimension-user_id | 32569892 |
| octolytics-dimension-user_login | cedricrupb |
| octolytics-dimension-repository_id | 425540049 |
| octolytics-dimension-repository_nwo | cedricrupb/code_diff |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 425540049 |
| octolytics-dimension-repository_network_root_nwo | cedricrupb/code_diff |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 878672b82363fd98fbdc5bd0edb68e572c8a8d9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width