-
Notifications
You must be signed in to change notification settings - Fork 22
Add ability to suppress line numbers from diff #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The patchmarks ( |
I'll take a whack at it in the next couple of days 👍 |
Awesome! |
thymikee
pushed a commit
that referenced
this issue
Mar 15, 2019
Solves #69. I'm identifying patch marks with a simple regex that looks for a line starting with `@`. This seems safe since `jest-diff` appears to add whitespace at the start of all lines. Therefore, even a line of content that begins with `@` will end up padded with whitespace in the diff itself. And rather than simply stripping out the patchmarks, I'm replacing them with `-------------`. Since the point of this is to avoid broken diffs, this solves that issue while still giving some indication that there are hidden lines in between those parts of the diff. Perhaps there's a better replacement indicator than that. We could certainly preserve the patch mark `@@` notation like `@@ ------------- @@` if we think that helps communicate the meaning of the new mark.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When diffing component state, I get something that looks like this because only this single line changed in the dom:
That's great! But if I modify an unrelated part of the component that results in additional lines of DOM before the class name change that I'm actually concerned about, the diff breaks because the
@@ -89,1 +89,1 @@
line number may have become@@ -93,1 +93,1 @@
.Can we add an option to suppress the line numbers?
The text was updated successfully, but these errors were encountered: