Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Apr 24, 2024
1 parent 4f4668e commit 2cc2d08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1342,12 +1342,11 @@ export class MotionDiffService {
const ln = htmlNewEl.body.querySelector(`.os-line-number`);
htmlNewEl.body.children[0].childNodes[0].before(ln);
htmlOldEl.body.children[0].querySelector(`.os-line-number`).remove();
htmlNew = htmlNewEl.body.innerHTML;
}
}

diffDomTiptapMigration(htmlOldEl, htmlNewEl);

htmlNew = htmlNewEl.body.innerHTML;
htmlOld = htmlOldEl.body.innerHTML;

// os-split-after should not be considered for detecting changes in paragraphs, so we strip it here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ function migrateListItems(doc: Document): void {
export function diffDomTiptapMigration(docOld: Document, docNew: Document): void {
if (docNew.querySelector(`li > p`)) {
migrateListItems(docOld);
migrateListItems(docNew);
}
}

0 comments on commit 2cc2d08

Please sign in to comment.