Skip to content

Commit

Permalink
fix: filter out languages without aliases
Browse files Browse the repository at this point in the history
See glutanimate#35

Co-authored-by: jackliusr <jackliusr@gmail.com>
  • Loading branch information
Barabazs and jackliusr committed Apr 16, 2024
1 parent ab476fe commit 0bcba59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/syntax_highlighting/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
# 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()}
# filter out langauges without aliases
LEXERS = [item for item in get_all_lexers() if item[1]]
LANGUAGES_MAP = {lex[0]: lex[1][0] for lex in LEXERS}


ERR_LEXER = (
Expand Down

0 comments on commit 0bcba59

Please sign in to comment.