From 6e36b13df75db60b4256157fbf865ccf3449a138 Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Sat, 24 Feb 2018 17:52:17 +0100 Subject: [PATCH] Update utils.py add color + other stuff --- cheat/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cheat/utils.py b/cheat/utils.py index e8c850d..7dee75b 100644 --- a/cheat/utils.py +++ b/cheat/utils.py @@ -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('```'):