Skip to content
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

Fix syslog syntax highlighting when no colon after "process" #1800

Merged
merged 1 commit into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/syntaxes/02_Extra/syslog.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contexts:
scope: entity.other.attribute-name.loghost.syslog
set: process
process:
- match: ([\w.-]+)(?:(\[)(\d+)(\]))?(:)
- match: ([\w.-]+)(?:(\[)(\d+)(\]))?([ :])
captures:
1: support.function.process.syslog
2: punctuation.separator.pid.begin.syslog
Expand Down
2 changes: 2 additions & 0 deletions tests/syntax-tests/highlighted/Syslog/example.syslog
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
Aug 11 13:29:06 hostname-here insomnia_insomnia.desktop[142666]: 13:29:06.316 › [updater] Updater not running platform=linux dev=false
Aug 11 13:36:34 192.168.220.5 nginx: 2021/08/11 13:36:34 [debug] 2031#2031: epoll add event: fd:6 op:1 ev:00002001
Aug 11 21:31:08 ::1 nginx: 2021/08/11 21:31:08 [debug] 760831#760831: epoll add event: fd:6 op:1 ev:10000001
Aug 11 21:40:31 hostname-here scop hello
Aug 16 21:38:21 hostname-here systemd[1]: Finished Cleanup of Temporary Directories.
2 changes: 2 additions & 0 deletions tests/syntax-tests/source/Syslog/example.syslog
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Apr 4 22:00:45 hostname-here dbus-daemon[1094]: [session uid=1000 pid=1094] Suc
Aug 11 13:29:06 hostname-here insomnia_insomnia.desktop[142666]: 13:29:06.316 › [updater] Updater not running platform=linux dev=false
Aug 11 13:36:34 192.168.220.5 nginx: 2021/08/11 13:36:34 [debug] 2031#2031: epoll add event: fd:6 op:1 ev:00002001
Aug 11 21:31:08 ::1 nginx: 2021/08/11 21:31:08 [debug] 760831#760831: epoll add event: fd:6 op:1 ev:10000001
Aug 11 21:40:31 hostname-here scop hello
Aug 16 21:38:21 hostname-here systemd[1]: Finished Cleanup of Temporary Directories.