mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-21 21:22:12 +01:00
Update utils.py
add color + other stuff
This commit is contained in:
parent
93288cb38b
commit
6e36b13df7
1 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,12 @@ def colorize(sheet_content):
|
|||
except ImportError:
|
||||
return sheet_content
|
||||
|
||||
# GMFTBY add
|
||||
if sheet_content == '' :
|
||||
# can not find the content about the term
|
||||
die('Can not find the content !')
|
||||
return
|
||||
|
||||
first_line = sheet_content.splitlines()[0]
|
||||
lexer = get_lexer_by_name('bash')
|
||||
if first_line.startswith('```'):
|
||||
|
|
Loading…
Reference in a new issue