Migrate diff-match-patch to a modern fork (#9511)

* Migrate to diff-match-patch-es & update api

* Update acknowledgements

* Update change notes

* Fix editcost attribute not working

* Make library compatible with ES2017
This commit is contained in:
XLBilly
2026-01-04 19:56:25 +08:00
committed by GitHub
parent c4c60933f4
commit c6906120d8
7 changed files with 912 additions and 1735 deletions

View File

@@ -0,0 +1,11 @@
title: $:/changenotes/5.4.0/#9511/impacts/api
changenote: $:/changenotes/5.4.0/#9511
created: 20251220010540143
modified: 20251220010540143
tags: $:/tags/ImpactNote
description: The diff-match-patch-es library uses different APIs
impact-type: compatibility-break
* Default export and the class constructor has been removed
* Function name has been unified to camelCase
* Previous options like Diff_Timeout and Diff_EditCost are now passed as an options object in the arguments if needed

View File

@@ -0,0 +1,10 @@
title: $:/changenotes/5.4.0/#9511
description: Migrate diff-match-patch library to diff-match-patch-es
release: 5.4.0
tags: $:/tags/ChangeNote
change-type: enhancement
change-category: developer
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9511
github-contributors: Leilei332
Migrate the unmaintained [[diff-match-patch|https://github.com/google/diff-match-patch]] library to the maintained and modern fork [[diff-match-patch-es|https://github.com/antfu/diff-match-patch-es]].