diff --git a/src/syntax_highlighting/main.py b/src/syntax_highlighting/main.py index c4369ac..b2a86a6 100644 --- a/src/syntax_highlighting/main.py +++ b/src/syntax_highlighting/main.py @@ -53,7 +53,11 @@ # to show the user AND # The "language aliases": short, cryptic names for internal # use by HtmlFormatter -LANGUAGES_MAP = {lex[0]: lex[1][0] for lex in get_all_lexers()} +LANGUAGES_MAP = { + lex[0]: lex[1][0] + for lex in get_all_lexers() + if len(lex) > 1 and len(lex[1]) +} ERR_LEXER = ("Error: Selected language not found.
"