Skip to content
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

Reduce consecutive diffmods to one #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

troelskn
Copy link

Makes for a prettier output. I made the feature be opt-in to not break any existing code, but most users would probably benefit from enabling it. I also changed the constructor signature to use named parameters, but retained BC.

@troelskn troelskn requested a review from lukelex November 27, 2017 12:01
@martinvium
Copy link
Collaborator

Was just discussing this project with @jesperronn and my last chance introduced a regression, which i meant to revert. Basically we should undo the ignore tags part, which was never used anywhere.

We can either do that now, and rebase your PR, or do it after, if you prefer @troelskn ?

@troelskn
Copy link
Author

Well. Naturally, I would prefer to have mine merged now, since it's already ready to do so. I'm not sure what exactly Ignore_tags was supposed to do in any case?

@troelskn troelskn requested a review from jesperronn November 28, 2017 08:31
@@ -59,4 +59,12 @@ class TestDiff
diff = TestDiff.diff(a, b)
expect(diff).to eq("<p><del class=\"diffmod\">a</del><ins class=\"diffmod\">ab</ins></p><p><ins class=\"diffins\">c</ins></b>")
end

it "should reduce consecutive matches" do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also make the same test example with reduce_consecutive: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants