forked from EvergreenCrypto/docker-finance
container: hledger-flow: remove potential % interpretation (printf)
Removes potential interpretation of percent signs in various types of descriptions/notes/labels (otherwise, import may break). Resolves "fatal: not enough arguments to satisfy format string" under certain conditions.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# docker-finance | modern accounting for the power-user
|
||||
#
|
||||
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -47,6 +47,7 @@ function parse()
|
||||
sub(/^ /, "", $5) # may have an empty space in front of line
|
||||
gsub(/, /, " - ") # may have (multiple) commas followed by space
|
||||
gsub(/"/, "", $5) # may have (multiple) quotes
|
||||
sub(/%/, "%%", $5) # remove potential interpretation
|
||||
|
||||
printf $1 OFS # Date
|
||||
printf $2 OFS # Time
|
||||
|
||||
Reference in New Issue
Block a user