From fc70dd42f1d526ec3634af81598991173e272e09 Mon Sep 17 00:00:00 2001 From: Kalle Johansson Date: Wed, 14 Jun 2023 16:45:01 +0200 Subject: [PATCH] fix: add support for non ascii characters --- lib/diffutils/diff_utils.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/diffutils/diff_utils.dart b/lib/diffutils/diff_utils.dart index 00b1d06..4cab742 100644 --- a/lib/diffutils/diff_utils.dart +++ b/lib/diffutils/diff_utils.dart @@ -13,8 +13,8 @@ class DiffUtils { List matrix; - var c1 = s1.runes.toList(); - var c2 = s2.runes.toList(); + var c1 = s1.codeUnits.toList(); + var c2 = s2.codeUnits.toList(); var p1 = 0; var p2 = 0; @@ -584,8 +584,8 @@ class DiffUtils { static int levEditDistance(String s1, String s2, int xcost) { int i; int half; - var c1 = s1.runes.toList(); - var c2 = s2.runes.toList(); + var c1 = s1.codeUnits.toList(); + var c2 = s2.codeUnits.toList(); var str1 = 0; var str2 = 0; var len1 = s1.length;