mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 12:27:27 +02:00
Add an option to set header on border (style) (#9920)
fix #9796 Sorry that you've had the issues. I've actually encountered them yesterday too (seems like they have appeared after some refactoring in the middle) but was not able to fix that rapid. Created a bunch of tests. cc: @fdncred Note: This option will be certainly slower then a default ones. (could be fixed but ... maybe later). Maybe it shall be cited somewhere. PS: Haven't tested on a wrapped/expanded tables. --------- Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com> Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
@ -42,3 +42,8 @@ pub fn string_truncate(text: &str, width: usize) -> String {
|
||||
|
||||
Truncate::truncate_text(line, width).into_owned()
|
||||
}
|
||||
|
||||
pub fn clean_charset(text: &str) -> String {
|
||||
// todo: optimize, I bet it can be done in 1 path
|
||||
text.replace('\t', " ").replace('\r', "")
|
||||
}
|
||||
|
Reference in New Issue
Block a user