Skip to content

Commit

Permalink
Fix an issue when colorize is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ncrocfer committed Mar 12, 2015
1 parent 12e5116 commit 630fd0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion howdoi/howdoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ def format_output(code, args):

# no lexer found above, use the guesser
if not lexer:
lexer = guess_lexer(code)
try:
lexer = guess_lexer(code)
except ClassNotFound:
return code

return highlight(code,
lexer,
Expand Down

0 comments on commit 630fd0b

Please sign in to comment.