diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-17 11:56:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 11:56:58 +0100 |
commit | 49d9359e26cbc586d9f3981d6a8fbc7485fecf12 (patch) | |
tree | 5d1f4bf8ee1cda7646904b208cb8d63aea1db695 /doc/_static | |
parent | f639b259258302267532252169c0bd2e31c26365 (diff) | |
download | pygments-git-49d9359e26cbc586d9f3981d6a8fbc7485fecf12.tar.gz |
demo: Sort options in lexer select (#1958)
Diffstat (limited to 'doc/_static')
-rw-r--r-- | doc/_static/demo.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/_static/demo.js b/doc/_static/demo.js index 1fc7a081..a4cbad4a 100644 --- a/doc/_static/demo.js +++ b/doc/_static/demo.js @@ -6,6 +6,7 @@ languagePluginLoader.then(() => { let qvars = getQueryVariables(); var lexerlist = pyodide.runPython('list(pygments.lexers.get_all_lexers())'); + lexerlist.sort((a,b) => a[1][0] < b[1][0] ? -1 : 1); var sel = document.getElementById("lang"); for (lex of lexerlist) { if (lex[1][0] === undefined) { |