diff options
author | Dan Davison <dandavison7@gmail.com> | 2019-08-04 15:42:10 -0700 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2019-08-06 23:43:51 -0700 |
commit | fd2fba3c8a06c796509b5d854cbb111b8eeb69ef (patch) | |
tree | d481469220b66ceb8b7480ef54c189369dcf8c4e /src/align.rs | |
parent | 0186fbee4f14f84e2ab916bd183e0bc7492cf794 (diff) |
Ignore whitespace in tokens when computing distance
Diffstat (limited to 'src/align.rs')
-rw-r--r-- | src/align.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/align.rs b/src/align.rs index 5100676f..198a37aa 100644 --- a/src/align.rs +++ b/src/align.rs @@ -134,7 +134,7 @@ impl<'a> Alignment<'a> { let noop = 0; let (mut numer, mut denom) = (0, 0); for (op, (_, s)) in self.edit_operations(0, 1, 1, 1, true) { - let n = s.graphemes(true).count(); + let n = s.trim().graphemes(true).count(); if op != noop { numer += n; } |