fix: Use ASCII_FULL for tables when stdout is not a TTY
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -146,9 +146,13 @@ pub fn create_table(use_styling: bool) -> Table {
|
|||||||
table.set_content_arrangement(ContentArrangement::Dynamic);
|
table.set_content_arrangement(ContentArrangement::Dynamic);
|
||||||
|
|
||||||
if use_styling {
|
if use_styling {
|
||||||
|
if std::io::stdout().is_terminal() {
|
||||||
table
|
table
|
||||||
.load_preset(comfy_table::presets::UTF8_FULL)
|
.load_preset(comfy_table::presets::UTF8_FULL)
|
||||||
.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS);
|
.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS);
|
||||||
|
} else {
|
||||||
|
table.load_preset(comfy_table::presets::ASCII_FULL);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
table.load_preset(comfy_table::presets::NOTHING);
|
table.load_preset(comfy_table::presets::NOTHING);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user