ace-diff/ace-diff

Internal server error : merge error

EnzoLORMONT opened this issue · 1 comments

I am trying to use AceDiff in my javascript code. I don't know if I'm doing something wrong, but from what I understand from the README, I must be on the right track. The merge error occurs in this small piece of code:

const editor = ace.edit("editor", {
      maxLines: 20,
      wrap: true,
      autoScrollEditorIntoView: true
  });
  const differ = new AceDiff({
      ace: editor,
      element: '#editor',
      left: {
          content: oldContent,
          editable: false,
      },
      right: {
          content: content,
          editable: false,
      },
  });

Here is the associated HTML:

<div id="editor" style="height: 250px; width: 400px; border: #cccccc 1px solid"></div>

This code therefore returns the error described in the title (merge error).
I also tried with this code:

const editor = ace.edit("editor", {
    maxLines: 20,
    wrap: true,
    autoScrollEditorIntoView: true
});
const differ = new AceDiff({
    element: '#editor',
    left: {
        content: oldContent,
        editable: false,
    },
    right: {
        content: content,
        editable: false,
    },
});

And the same HTML. I manage to get something but nothing very relevant, I leave you with the photo :
image
I don't see what I'm doing wrong. My packages whether ace-build or ace-diff are up to date. Moreover my 2 variables contain text, about 100 lines.
Thank you for taking the time to read this and perhaps respond.

JackuB commented

@EnzoLORMONT did you manage to solve the issue? 🙏 Would you mind sharing for anyone else running into this?