Skip to content

Commit 0bcba59

Browse files
Barabazsjackliusr
andcommitted
fix: filter out languages without aliases
See glutanimate#35 Co-authored-by: jackliusr <jackliusr@gmail.com>
1 parent ab476fe commit 0bcba59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/syntax_highlighting/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
# to show the user AND
4848
# The "language aliases": short, cryptic names for internal
4949
# use by HtmlFormatter
50-
LANGUAGES_MAP = {lex[0]: lex[1][0] for lex in get_all_lexers()}
50+
# filter out langauges without aliases
51+
LEXERS = [item for item in get_all_lexers() if item[1]]
52+
LANGUAGES_MAP = {lex[0]: lex[1][0] for lex in LEXERS}
5153

5254

5355
ERR_LEXER = (

0 commit comments

Comments
 (0)