Merge remote-tracking branch 'krobelus/optimize-ledger'

This commit is contained in:
Maxime Coste 2022-09-09 15:43:55 +02:00
commit 9270047e2c

View File

@ -64,12 +64,14 @@ add-highlighter shared/ledger/other region '^(P|=|~)' '$' fill meta
# The following highlighters implement # The following highlighters implement
# https://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives # https://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives
add-highlighter shared/ledger/default default-region group
# Add highlighters for simple one-line command directives # Add highlighters for simple one-line command directives
evaluate-commands %sh{ evaluate-commands %sh{
# TODO: Is `expr` also a command directive? The documentation confuses me. # TODO: Is `expr` also a command directive? The documentation confuses me.
for cmd in 'apply account' 'apply fixed' 'assert' 'bucket' 'check' 'end' \ for cmd in 'apply account' 'apply fixed' 'assert' 'bucket' 'check' 'end' \
'include' 'apply tag' 'test' 'year'; do 'include' 'apply tag' 'test' 'year'; do
echo "add-highlighter shared/ledger/ region '^${cmd}' '.' fill function" echo "add-highlighter shared/ledger/default/ regex '^${cmd}\b' 0:function"
done done
} }