Skip to content

Fix(IndexError): Handle unexpected System level pygments import #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/syntax_highlighting/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ("<b>Error</b>: Selected language not found.<br>"
Expand Down