Skip to content

Conversation

@randomstuff
Copy link
Contributor

This implements more precise rules for systemd unit and .desktop files. For example, this fixes entries such as:

Categories=System;TerminalEmulator;
MimeType=image/*;application/x-sh;application/x-shellscript;inode/directory;text/*;x-scheme-handler/kitty;

which were considered to contain a trailing comment.

Copy link
Member

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Generally a good idea, and can be extended later e.g. recognizing systemd's quoting and escaping mechanisms. Just a few nits...

@randomstuff
Copy link
Contributor Author

Added support for .desktop language tags. Currently I'm (ab)using Name.Namespace.

I see that TurtleLexer uses Generic.Emph for a similar usage ("..."@en) which is not really better.

@birkenfeld birkenfeld added the changelog-update Items which need to get mentioned in the changelog label Jul 9, 2023
@birkenfeld
Copy link
Member

LGTM. Thanks!

@birkenfeld birkenfeld merged commit 3c7fbf8 into pygments:master Jul 9, 2023
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Aug 5, 2023
@Anteru Anteru added this to the 2.16.0 milestone Aug 5, 2023
@Anteru Anteru added the A-lexing area: changes to individual lexers label Aug 5, 2023
@randomstuff randomstuff deleted the systemd branch August 7, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lexing area: changes to individual lexers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants