on master help sign in
add word boundaries to log syntax highlighting
867cf63Keith Hall
assets/syntaxes/02_Extra/log.sublime-syntax+4−4
@@ -25,7 +25,7 @@ contexts:
25 - include: dates
25 - include: dates
26 - include: ip_addresses
26 - include: ip_addresses
27 - include: numbers
27 - include: numbers
28− - match: \b(?i:fail(?:ure|ed)?|error)\b
28+ - match: \b(?i:fail(?:ure|ed)?|error|exception)\b
29 scope: invalid.illegal.error.log
29 scope: invalid.illegal.error.log
30 #- include: scope:text.html.markdown#autolink-inet
30 #- include: scope:text.html.markdown#autolink-inet
31 - match: \b\w+:/{2,3}
31 - match: \b\w+:/{2,3}
@@ -41,7 +41,7 @@ contexts:
41 captures:
41 captures:
42 1: punctuation.separator.decimal.log
42 1: punctuation.separator.decimal.log
43 ip_addresses:
43 ip_addresses:
44− - match: (?=(?:{{ipv4_part}}\.){3}{{ipv4_part}})
44+ - match: \b(?=(?:{{ipv4_part}}\.){3}{{ipv4_part}}\b)
45 push:
45 push:
46 - meta_scope: meta.ipaddress.v4.log meta.number.integer.decimal.log
46 - meta_scope: meta.ipaddress.v4.log meta.number.integer.decimal.log
47 - match: \d+
47 - match: \d+
@@ -50,7 +50,7 @@ contexts:
50 scope: punctuation.separator.sequence.log
50 scope: punctuation.separator.sequence.log
51 - match: ''
51 - match: ''
52 pop: true
52 pop: true
53− - match: (?=(?:\h{0,4}:){2,6}\h{1,4})
53+ - match: (?=(?:\h{0,4}:){2,6}\h{1,4}\b)
54 push:
54 push:
55 - meta_scope: meta.ipaddress.v6.log meta.number.integer.hexadecimal.log
55 - meta_scope: meta.ipaddress.v6.log meta.number.integer.hexadecimal.log
56 - match: \h{1,4}
56 - match: \h{1,4}
@@ -60,7 +60,7 @@ contexts:
60 - match: ''
60 - match: ''
61 pop: true
61 pop: true
62 numbers:
62 numbers:
63− - match: (0x)(\h+)(?:(\.)(\h+))?
63+ - match: \b(0x)(\h+)(?:(\.)(\h+))?\b
64 scope: meta.number.float.hexadecimal.log
64 scope: meta.number.float.hexadecimal.log
65 captures:
65 captures:
66 1: constant.numeric.base.log
66 1: constant.numeric.base.log