[highlight] turn off nesting for var highlight

This commit is contained in:
Tim Stack 2022-09-20 13:51:56 -07:00
parent a437d9fcc9
commit 3f3e6dcbdc
5 changed files with 14 additions and 13 deletions

View File

@ -429,6 +429,7 @@ setup_highlights(highlight_map_t& hm)
"(?<!\\$)\\$\\((\\w+)\\)|"
"(?<!\\$)\\$\\{(\\w+)\\}"
")"))
.with_nestable(false)
.with_role(role_t::VCR_VARIABLE);
hm[{highlight_source_t::INTERNAL, "rust.sym"}]
= highlighter(xpcre_compile("\\b[A-Z_][A-Z0-9_]+\\b"))

View File

@ -1,7 +1,7 @@
{
 "wrapper": [
{"message":""
 select Id from Account where id = $sfid
 select Id from Account where id = $sfid
 ^
 ERROR at Row:1:Column:34
 line 1:34 no viable alternative at character '$'

View File

@ -1,17 +1,17 @@
Build[1][2] Docs[3][4] Coverage Status[5][6] lnav[7][8]
▌[1] - https://github.com/tstack/lnav/workflows/ci-build/badge.svg
▌[2] - https://github.com/tstack/lnav/actions?query=workflow%3Aci-build
▌[3] - https://readthedocs.org/projects/lnav/badge/?version=latest&style=plastic
▌[2] - https://github.com/tstack/lnav/actions?query=workflow%3Aci-build
▌[3] - https://readthedocs.org/projects/lnav/badge/?version=latest&style=plastic
▌[4] - https://docs.lnav.org
▌[5] - https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master
▌[6] - https://coveralls.io/github/tstack/lnav?branch=master
▌[5] - https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master
▌[6] - https://coveralls.io/github/tstack/lnav?branch=master
▌[7] - https://snapcraft.io/lnav/badge.svg
▌[8] - https://snapcraft.io/lnav
<img
src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg"
height="20"/>[1]
src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg"
height="20"/>[1]
▌[1] - https://discord.gg/erBPnKwz7R
@ -97,11 +97,11 @@ output those messages still in a non-binary representation:
If using systemd v236 or newer, the output fields can be limited to
the ones actually recognized by  lnav  for increased efficiency:
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
If your system has been running for a long time, for increased
efficiency you may want to limit the number of log lines fed into  lnav
, e.g. via  journalctl 's  -n  or  --since=...  options.
, e.g. via  journalctl 's  -n  or  --since=...  options.
In case of a persistent journal, you may want to limit the number of
log lines fed into  lnav  via  journalctl 's  -b  option.

View File

@ -68,11 +68,11 @@ output those messages still in a non-binary representation:
If using systemd v236 or newer, the output fields can be limited to
the ones actually recognized by  lnav  for increased efficiency:
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
If your system has been running for a long time, for increased
efficiency you may want to limit the number of log lines fed into  lnav
, e.g. via  journalctl 's  -n  or  --since=...  options.
, e.g. via  journalctl 's  -n  or  --since=...  options.
In case of a persistent journal, you may want to limit the number of
log lines fed into  lnav  via  journalctl 's  -b  option.

View File

@ -68,11 +68,11 @@ output those messages still in a non-binary representation:
If using systemd v236 or newer, the output fields can be limited to
the ones actually recognized by  lnav  for increased efficiency:
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
If your system has been running for a long time, for increased
efficiency you may want to limit the number of log lines fed into  lnav
, e.g. via  journalctl 's  -n  or  --since=...  options.
, e.g. via  journalctl 's  -n  or  --since=...  options.
In case of a persistent journal, you may want to limit the number of
log lines fed into  lnav  via  journalctl 's  -b  option.