Skip to content

Commit

Permalink
DEV: Update diffhtml to 1.0.0-beta.29 again (discourse#22365)
Browse files Browse the repository at this point in the history
This reverts commit d40da76.
  • Loading branch information
nbianca authored Jul 3, 2023
1 parent 1b693d0 commit 6a50d79
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions app/assets/javascripts/discourse/app/components/d-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,12 @@ export default Component.extend(TextareaTextManipulation, {
);

previewPromise = loadScript("/javascripts/diffhtml.min.js").then(() => {
window.diff.innerHTML(
this.element.querySelector(".d-editor-preview"),
cookedElement.innerHTML
);
const previewElement =
this.element.querySelector(".d-editor-preview");
// This is a workaround for a known bug in diffHTML
// https://github.com/tbranyen/diffhtml/issues/217#issuecomment-1479956332
window.diff.release(previewElement);
window.diff.innerHTML(previewElement, cookedElement.innerHTML);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const PUBLIC_JS_VERSIONS = {
"chart.min.js": "chart.js/3.5.1/chart.min.js",
"chartjs-plugin-datalabels.min.js":
"chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js",
"diffhtml.min.js": "diffhtml/1.0.0-beta.20/diffhtml.min.js",
"diffhtml.min.js": "diffhtml/1.0.0-beta.29/diffhtml.min.js",
"jquery.magnific-popup.min.js":
"magnific-popup/1.1.0/jquery.magnific-popup.min.js",
"pikaday.js": "pikaday/1.8.2/pikaday.js",
Expand Down
Loading

0 comments on commit 6a50d79

Please sign in to comment.