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
Could you remove "protected" from raw_array? I need the diff output in machine readable format (rather than display to user), and raw_array seems the most usable format. My use case is that I'm developing a text editor (https://github.com/SamiSieranoja/vimamsa) and I want to process the buffer contents with external program and then include the diffs of before/after in undo history.
diff --git a/lib/differ/diff.rb b/lib/differ/diff.rb
index 76d3012..5f46cb6 100644
--- a/lib/differ/diff.rb
+++ b/lib/differ/diff.rb
@@ -82,7 +82,7 @@ module Differ
end
end
- protected
+# protected
def raw_array
@raw
end
The text was updated successfully, but these errors were encountered:
I agree, I'm in the same situation. I want to process only the changes, not the part of the text that stays the same, and the only way to do so seems to be for me to go through the raw_array myself. While it is true that I can work around this by doing diff.send(:raw_array), having a properly exposed API would be a lot cleaner, perhaps called #to_a as suggested earlier or simply #parts. Thanks for a great little gem otherwise!
Hi.
Could you remove "protected" from raw_array? I need the diff output in machine readable format (rather than display to user), and raw_array seems the most usable format. My use case is that I'm developing a text editor (https://github.com/SamiSieranoja/vimamsa) and I want to process the buffer contents with external program and then include the diffs of before/after in undo history.
The text was updated successfully, but these errors were encountered: