Adjust getEffectiveAssignment to compute an intermediary form of the active assignments (with an additional Either wrapper to distinguish top-level and conditional assignments) and move the remaining work to its only caller, hledgerField. Rework hledgerFieldValue. Instead of calling hledgerField, call getEffectiveAssignment and--in the conditional block case--construct a CsvRules scoped just to the active ConditionalBlock before calling renderTemplate. Adjust regexMatchValue to use rconditionalblocks to access conditional blocks from the CsvRules, rather than rblocksassigning, since we haven't narrowed the scope of that field. The result is match group references are only expanded for match groups that occur within the in-scope ConditionalBlock. Fixes: #2158. Signed-off-by: Jonathan Dowland <jon@dow.land> |
||
|---|---|---|
| .. | ||
| Common.hs | ||
| CsvReader.hs | ||
| CsvUtils.hs | ||
| InputOptions.hs | ||
| JournalReader.hs | ||
| LedgerReader.hs.disabled | ||
| RulesReader.hs | ||
| TimeclockReader.hs | ||
| TimedotReader.hs | ||