diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2021-08-15 19:20:37 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2021-08-15 19:20:37 +0200 |
commit | 7083170bb9e3149a71425e7ed61f0cf8c8a02892 (patch) | |
tree | ea3f7a4ab82d6ef3f98f66440f945b88b9c79b86 | |
parent | ba9181fddc4d74fe269571eba42da5bfc086d5fa (diff) |
Handle lexers without an alias
-rw-r--r-- | pastepy/pastepy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pastepy/pastepy.py b/pastepy/pastepy.py index ca113c0..9b86d17 100644 --- a/pastepy/pastepy.py +++ b/pastepy/pastepy.py @@ -34,7 +34,7 @@ class CustomHtmlFormatter(HtmlFormatter): yield 0, '</pre>' def init_lexers(): - all_lexers = dict([(x[0], x[1][0]) for x in get_all_lexers()]) + all_lexers = dict([(x[0], x[1][0] if x[1] else x[0]) for x in get_all_lexers()]) lexers = [] removed = [] for cat, ls in current_app.config['CATEGORIES']: |