1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-10 20:01:45 +00:00

fix(syntax): avoid repeated log level scans

This commit is contained in:
Matei6942
2026-08-02 10:52:05 +03:00
parent 2ba8db9c14
commit db69aab106
+5 -4
View File
@@ -38,19 +38,20 @@ contexts:
scope: markup.underline.link.scheme.log
push: url-host
log_level_lines:
- match: (?=.*{{error}})
# Prevent retrying each lookahead at every position.
- match: \G(?=.*{{error}})
push:
- error_line_meta
- main_pop_at_eol
- match: (?=.*{{warning}})
- match: \G(?=.*{{warning}})
push:
- warning_line_meta
- main_pop_at_eol
- match: (?=.*{{info}})
- match: \G(?=.*{{info}})
push:
- info_line_meta
- main_pop_at_eol
- match: (?=.*{{debug}})
- match: \G(?=.*{{debug}})
push:
- debug_line_meta
- main_pop_at_eol