summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Hall <keith-hall@users.noreply.github.com>2021-08-17 21:22:52 +0300
committerGitHub <noreply@github.com>2021-08-17 21:22:52 +0300
commit5eb93a6eae6469a57a8b3ac8db4538321ee6c7f0 (patch)
treee78c01954c4fade91cbbf8f21d2461107f80f5cd
parent25fa577cd06c9753756d116410aaa19735c95085 (diff)
parent133b06e94560ea0d94d201259543b4ad79823b0a (diff)
Merge pull request #1800 from sharkdp/syslog_no_colon_after_process
Fix syslog syntax highlighting when no colon after "process"
-rw-r--r--assets/syntaxes/02_Extra/syslog.sublime-syntax2
-rw-r--r--tests/syntax-tests/highlighted/Syslog/example.syslog2
-rw-r--r--tests/syntax-tests/source/Syslog/example.syslog2
3 files changed, 5 insertions, 1 deletions
diff --git a/assets/syntaxes/02_Extra/syslog.sublime-syntax b/assets/syntaxes/02_Extra/syslog.sublime-syntax
index 8c4523a8..1efad346 100644
--- a/assets/syntaxes/02_Extra/syslog.sublime-syntax
+++ b/assets/syntaxes/02_Extra/syslog.sublime-syntax
@@ -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
diff --git a/tests/syntax-tests/highlighted/Syslog/example.syslog b/tests/syntax-tests/highlighted/Syslog/example.syslog
index 3c6c29ed..9ec04944 100644
--- a/tests/syntax-tests/highlighted/Syslog/example.syslog
+++ b/tests/syntax-tests/highlighted/Syslog/example.syslog
@@ -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.
diff --git a/tests/syntax-tests/source/Syslog/example.syslog b/tests/syntax-tests/source/Syslog/example.syslog
index 0cde74cd..9dc82e7c 100644
--- a/tests/syntax-tests/source/Syslog/example.syslog
+++ b/tests/syntax-tests/source/Syslog/example.syslog
@@ -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.