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> |
||
|---|---|---|
| .. | ||
| Hledger | ||
| other/ledger-parse | ||
| test | ||
| Text | ||
| .date.m4 | ||
| .ghci | ||
| .version | ||
| .version.m4 | ||
| CHANGES.md | ||
| hledger-lib.cabal | ||
| Hledger.hs | ||
| LICENSE | ||
| package.yaml | ||
| README.md | ||
| Setup.hs | ||
hledger-lib
A reusable library containing hledger’s core functionality. This is used by most hledger* packages so that they support the same common file formats, command line options, reports etc.
See also: the project README and home page.