Skip to content

Commit

Permalink
v0.2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
yh202109 committed Jul 13, 2024
1 parent 40fcc20 commit b60a519
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mtbp3/health/ectd.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def find_section_given_words(self, words, outfmt='simple', include='up', to_righ
out_colored = []
for row in out:
for word in words:
try:
start = row.lower().index(word.lower())
end = start + len(word)
except ValueError:
continue
start = row.lower().index(word.lower())
end = start + len(word)
row = row[:start] + f"\033[91m{row[start:end]}\033[0m" + row[end:]
Expand Down

0 comments on commit b60a519

Please sign in to comment.