fix: clean up whitespace in ANSI utilities and preview script

This commit is contained in:
Benexl
2025-12-01 18:48:15 +03:00
parent 901d1e87c5
commit 26bc84e2eb
2 changed files with 12 additions and 7 deletions

View File

@@ -88,6 +88,8 @@ def print_table_row(
# Print remaining wrapped lines (left-aligned, indented)
for line in value_lines[1:]:
print(f"{' ' * (key_width + 2)}{line}")
def strip_markdown(text: str) -> str:
"""
Strip markdown formatting from text.

View File

@@ -140,9 +140,12 @@ def _ensure_ansi_utils_in_cache():
source = FZF_SCRIPTS_DIR / "_ansi_utils.py"
dest = INFO_CACHE_DIR / "_ansi_utils.py"
if source.exists() and (not dest.exists() or source.stat().st_mtime > dest.stat().st_mtime):
if source.exists() and (
not dest.exists() or source.stat().st_mtime > dest.stat().st_mtime
):
try:
import shutil
shutil.copy2(source, dest)
logger.debug(f"Copied _ansi_utils.py to {INFO_CACHE_DIR}")
except Exception as e: