Use a simpler word separator algorithm to keep URLs intact.
This commit is contained in:
parent
c35efb18eb
commit
14c6c12a96
@ -56,7 +56,7 @@ serde = { version = "1.0.137", features = ["derive"] }
|
||||
subplotlib = { version = ">=0.7, <0.12", optional = true }
|
||||
terminal_size = ">=0.2.6, <0.5"
|
||||
termcolor = "1.2.0"
|
||||
textwrap = ">=0.15, <0.17"
|
||||
textwrap = { version = ">=0.15, <0.17", default-features = false, features = ["smawk", "unicode-width"] }
|
||||
typenum = "1"
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -42,6 +42,10 @@ fn options() -> textwrap::Options<'static> {
|
||||
// textwrap do it, because textwrap uses an older version,
|
||||
// leading to duplicate crates.
|
||||
textwrap::Options::new(stderr_terminal_width())
|
||||
// Using a more naive separation algorithm keeps URLs
|
||||
// together, whereas the unicode line breaking algorithm would
|
||||
// break after e.g. `hkps://`.
|
||||
.word_separator(textwrap::WordSeparator::AsciiSpace)
|
||||
}).clone()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user