mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-19 01:00:34 +01:00
add word boundaries to log syntax highlighting
This commit is contained in:
parent
7c4edacb2b
commit
867cf63dd9
8
assets/syntaxes/02_Extra/log.sublime-syntax
vendored
8
assets/syntaxes/02_Extra/log.sublime-syntax
vendored
@ -25,7 +25,7 @@ contexts:
|
|||||||
- include: dates
|
- include: dates
|
||||||
- include: ip_addresses
|
- include: ip_addresses
|
||||||
- include: numbers
|
- include: numbers
|
||||||
- match: \b(?i:fail(?:ure|ed)?|error)\b
|
- match: \b(?i:fail(?:ure|ed)?|error|exception)\b
|
||||||
scope: invalid.illegal.error.log
|
scope: invalid.illegal.error.log
|
||||||
#- include: scope:text.html.markdown#autolink-inet
|
#- include: scope:text.html.markdown#autolink-inet
|
||||||
- match: \b\w+:/{2,3}
|
- match: \b\w+:/{2,3}
|
||||||
@ -41,7 +41,7 @@ contexts:
|
|||||||
captures:
|
captures:
|
||||||
1: punctuation.separator.decimal.log
|
1: punctuation.separator.decimal.log
|
||||||
ip_addresses:
|
ip_addresses:
|
||||||
- match: (?=(?:{{ipv4_part}}\.){3}{{ipv4_part}})
|
- match: \b(?=(?:{{ipv4_part}}\.){3}{{ipv4_part}}\b)
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.ipaddress.v4.log meta.number.integer.decimal.log
|
- meta_scope: meta.ipaddress.v4.log meta.number.integer.decimal.log
|
||||||
- match: \d+
|
- match: \d+
|
||||||
@ -50,7 +50,7 @@ contexts:
|
|||||||
scope: punctuation.separator.sequence.log
|
scope: punctuation.separator.sequence.log
|
||||||
- match: ''
|
- match: ''
|
||||||
pop: true
|
pop: true
|
||||||
- match: (?=(?:\h{0,4}:){2,6}\h{1,4})
|
- match: (?=(?:\h{0,4}:){2,6}\h{1,4}\b)
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.ipaddress.v6.log meta.number.integer.hexadecimal.log
|
- meta_scope: meta.ipaddress.v6.log meta.number.integer.hexadecimal.log
|
||||||
- match: \h{1,4}
|
- match: \h{1,4}
|
||||||
@ -60,7 +60,7 @@ contexts:
|
|||||||
- match: ''
|
- match: ''
|
||||||
pop: true
|
pop: true
|
||||||
numbers:
|
numbers:
|
||||||
- match: (0x)(\h+)(?:(\.)(\h+))?
|
- match: \b(0x)(\h+)(?:(\.)(\h+))?\b
|
||||||
scope: meta.number.float.hexadecimal.log
|
scope: meta.number.float.hexadecimal.log
|
||||||
captures:
|
captures:
|
||||||
1: constant.numeric.base.log
|
1: constant.numeric.base.log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user