diff options
| author | Shulhan <ms@kilabit.info> | 2026-04-12 20:35:12 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-04-12 20:35:18 +0700 |
| commit | 05849aa15abc0bcfc6a76fc86af2ef6590023ce2 (patch) | |
| tree | ee88bb0b639b904232e79fcd5ecd94ba62ae2180 /lib/text/diff/func.go | |
| parent | 986ad438d702ebf7d2604def94eaf3e807be7cfd (diff) | |
| download | pakakeh.go-05849aa15abc0bcfc6a76fc86af2ef6590023ce2.tar.xz | |
text/diff: rename LevelWords to LevelChunks
Using Words seems like misleading since we capture the characters
difference, not a word as in human language.
Diffstat (limited to 'lib/text/diff/func.go')
| -rw-r--r-- | lib/text/diff/func.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/text/diff/func.go b/lib/text/diff/func.go index 6acc5178..7efe55e2 100644 --- a/lib/text/diff/func.go +++ b/lib/text/diff/func.go @@ -8,23 +8,6 @@ import ( "git.sr.ht/~shulhan/pakakeh.go/lib/text" ) -const ( - // LevelLines define that we want only lines change set. - LevelLines = iota - // LevelWords define that we want the change not only capture the - // different per line, but also changes inside the line. - LevelWords -) - -const ( - // DefMatchLen minimum number of bytes used for searching the next - // matched chunk in line. - DefMatchLen = 5 - // DefMatchRatio define default minimum match ratio to be considered as - // change. - DefMatchRatio = 0.7 -) - // Bytes returns the character differences (additions and deletion) between // old and new bytes, start at specific position. func Bytes(old, new []byte, oldat, newat int) (adds, dels text.Chunks) { |
