Add support for byte diffing (#7)

Restructured text diffing to also support bstr
This commit is contained in:
Armin Ronacher 2021-02-02 14:16:00 +01:00 committed by GitHub
parent e53427b56f
commit 4b85e70f91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 775 additions and 307 deletions

View file

@ -19,7 +19,11 @@ all-features = true
default = ["text"]
text = []
inline = ["unicode"]
unicode = ["text", "unicode-segmentation"]
# this annoyingly currently also turns on bstr and not just bstr/unicode
# unclear if this is fixable
unicode = ["text", "unicode-segmentation", "bstr/unicode"]
bytes = ["bstr", "text"]
[dev-dependencies]
insta = "1.5.2"
@ -27,6 +31,7 @@ console = "0.14.0"
[dependencies]
unicode-segmentation = { version = "1.7.1", optional = true }
bstr = { version = "0.2.14", optional = true, default-features = false }
[[example]]
name = "terminal"
@ -34,11 +39,11 @@ required-features = ["text"]
[[example]]
name = "terminal-inline"
required-features = ["text", "inline"]
required-features = ["text", "inline", "bytes"]
[[example]]
name = "udiff"
required-features = ["text"]
required-features = ["text", "bytes"]
[[example]]
name = "close-matches"