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

Incorrect highlighting #53

Closed
shds86 opened this issue Aug 20, 2018 · 6 comments
Closed

Incorrect highlighting #53

shds86 opened this issue Aug 20, 2018 · 6 comments

Comments

@shds86
Copy link

shds86 commented Aug 20, 2018

I have 2 version of a code with one different value of var:
left:

(function (window, $) {

    var sourceId, targetId, item,
        leftSource, rightSource,
        aceDiffer;
    $(document).ready(function () {
        sourceId = $("#source").val();
        targetId = $("#target").val();
        item = $("#item").val();

        aceDiffer = new AceDiff({
            element: '#diffs-container',
            mode: "",
            left: {
                editable: false,
                copyLinkEnabled: false,
                content: ''
            },
            right: {
                editable: false,
                copyLinkEnabled: false,
                content: ''
            }
        });

})(window, jQuery);

right:

(function (window, $) {

    var sourceId, targetId, item,
        leftSource, rightSource,
        aceDiffer;
    $(document).ready(function () {
        sourceId = $("#source").val();
        targetId = $("#target").val();
        item = $("#item").val();

        aceDiffer = new AceDiff({
            element: '#diffs-container',
            mode: "",
            left: {
                editable: false,
                copyLinkEnabled: true,
                content: ''
            },
            right: {
                editable: false,
                copyLinkEnabled: false,
                content: ''
            }
        });

})(window, jQuery);

The diff is in left.copyLinkEnabled, left code has false, right has true but ace-diff marks the next line of the editors like it has the diff. Where is the issue?

@shds86
Copy link
Author

shds86 commented Aug 20, 2018

image

@nitslucky
Copy link

Did you find solution?

@shds86
Copy link
Author

shds86 commented Jul 25, 2019

Unfortunately I have not found solution. Too many ace specific and ace-diff specific moments have been found. I use ace v1.2.6

@JackuB
Copy link
Collaborator

JackuB commented May 24, 2020

Don't have an example to repro, but a bunch of similar issues were solved by PR #69 - closing this one as well. Feel free to reopen

@JackuB JackuB closed this as completed May 24, 2020
@Jeff534
Copy link

Jeff534 commented May 28, 2020

Same issue here. Is there a plan when the fix could be merged?

@Nicky-G1
Copy link

Nicky-G1 commented Aug 23, 2023

It seems like this is still an issue and something I am running into trying to implement this. It doesn't seem to handle nested XML documents very well. Most times the change highlighting is off by a line or incorrect by a decent margin. Example below using the demo website using the latest versions.

image

I used a demo page off the diff-match-patch to sort of see what the underlying diff could look like and it seems to generate the diff correctly.

https://neil.fraser.name/software/diff_match_patch/demos/diff.html
image

It appears as though ( just a guess ), that something is not working correctly with the visualization portions in some cases.

Has anyone else run into this and found a working solution ? I'm not sure if there's any plans to update this library, but I may have to look into a different solution for my use case if not.

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

No branches or pull requests

5 participants