From 3040fb9e6062e6ce9d73f99cebb2097401340c7a Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Thu, 6 Jun 2024 18:32:22 -0700 Subject: [PATCH] hledger-flow: ally: fix Description Descriptions with leading space were falsely included as `Type` tag --- container/src/hledger-flow/accounts/ally/ally-shared.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container/src/hledger-flow/accounts/ally/ally-shared.bash b/container/src/hledger-flow/accounts/ally/ally-shared.bash index 20fbeae..f9c98fd 100755 --- a/container/src/hledger-flow/accounts/ally/ally-shared.bash +++ b/container/src/hledger-flow/accounts/ally/ally-shared.bash @@ -43,9 +43,9 @@ function parse() if (NR<2 || $1 !~ global_year) next - # Description may have comma followed by space - # TODO: what about description ending in comma?... - gsub(/, /, " - "); + # `Description` cleanup + sub(/^ /, "", $5) # may have an empty space in front of line + gsub(/, /, " - ") # may have (multiple) commas followed by space printf $1 OFS # date printf $2 OFS # time