You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm not seeing it in the docs, but I think it would be nice to apply a Change Object, or an array of them, to a string to be able to create a changed string.
Makes sense, but figuring out how to adapt the logic in applyPatch is not entirely trivial. That logic assumes that the changes are a series of hunks with line numbers and local context (rather than literally the entire file content being included in the diff like it is with change objects) and that each change is to an entire line; these things aren't reliably true for change objects.
Activity
subwaymatch commentedon May 13, 2017
+1 for this feature
ExplodingCabbage commentedon Dec 27, 2023
Makes sense, but figuring out how to adapt the logic in
applyPatch
is not entirely trivial. That logic assumes that the changes are a series of hunks with line numbers and local context (rather than literally the entire file content being included in the diff like it is with change objects) and that each change is to an entire line; these things aren't reliably true for change objects.