We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6df2d07 commit 87cf4c5Copy full SHA for 87cf4c5
1 file changed
snippets/models.py
@@ -4,8 +4,9 @@
4
from pygments.formatters import HtmlFormatter
5
from pygments import highlight
6
7
-LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in get_all_lexers()])
8
-STYLE_CHOICES = sorted((item, item) for item in list(get_all_styles()))
+LEXERS = [item for item in get_all_lexers() if item[1]]
+LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS])
9
+STYLE_CHOICES = sorted((item, item) for item in get_all_styles())
10
11
12
class Snippet(models.Model):
0 commit comments