Skip to content

demo: Sort options in lexer select#1958

Merged
birkenfeld merged 1 commit intopygments:masterfrom
not-my-profile:demo-sort-lexers
Nov 17, 2021
Merged

demo: Sort options in lexer select#1958
birkenfeld merged 1 commit intopygments:masterfrom
not-my-profile:demo-sort-lexers

Conversation

@not-my-profile
Copy link
Contributor

Previously CSS+Django/Jinja, CSS+Ruby, and CSS+Genshi Text were all
before CSS because pygments.lexers.LEXERS contains the lexers ordered
alphabetically by their class name and CssDjangoLexer, CssErbLexer and
CssGenshiLexer come before CssLexer.

If users are however typing "CSS" while focusing the language select in
the demo, chances are that they actually want the base CSS lexer. The
same applies to HTML, JavaScript, XML, etc.

Previously CSS+Django/Jinja, CSS+Ruby, and CSS+Genshi Text were all
before CSS because pygments.lexers.LEXERS contains the lexers ordered
alphabetically by their class name and CssDjangoLexer, CssErbLexer and
CssGenshiLexer come before CssLexer.

If users are however typing "CSS" while focusing the language select in
the demo, chances are that they actually want the base CSS lexer. The
same applies to HTML, JavaScript, XML, etc.
@birkenfeld
Copy link
Member

Thanks!

@birkenfeld birkenfeld merged commit 49d9359 into pygments:master Nov 17, 2021
hwayne pushed a commit to hwayne/pygments that referenced this pull request Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants