-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ adds a lexer for systemd unit files #1568
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting the PR and I'm sorry it took a bit of time to respond. There's a comment below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test seems too simple now as it does not contain any comment nor section ([Service]
, [Unit]
…)
Only `.service` file extension would be supported for now
Never mind, this test is not the visual one. It does not really matter if the sample file is not complete. |
@jljouannic Thanks for this! I'm about to start the release process for v3.23.0. Once that's complete, this will be part of the gem available from RubyGems. Thanks for helping to improve Rouge! |
Why not use INI / Here's my blog post which uses (source code plus Wayback Machine in case my blog disappears later) |
This is a first basic implementation, which, I agree, gives a pretty similar result as the |
This commit adds a lexer for systemd unit files. These unit files can have multiple extensions but this commit only supports the `*.service` file glob at this stage. Co-authored-by: Michael Camilleri <mike@inqk.net>
This lexer is pretty basic. It is inspired from an existing lexer found in Chroma.