hledger/hledger-lib/Hledger/Read
Jonathan Dowland b7027c8bbb feat:import: resolve matchgroup references in ConditionalBlock scope (#2158)
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>
2024-02-29 21:44:40 +00:00
..
Common.hs feat:allow other kinds of unicode space as digit group separators 2024-02-28 09:12:17 -10:00
CsvReader.hs imp: Support tsv and ssv prefixes (#2164) 2024-02-08 06:44:44 -10:00
CsvUtils.hs feat: cli: Add tsv output (#869) 2023-11-06 16:46:04 -08:00
InputOptions.hs fix:--anon: now hidden, gives an error, still usable as --obfuscate [#2133] 2024-01-21 11:59:11 -10:00
JournalReader.hs imp:journal: use a symlink's target's directory for relative include paths 2024-02-22 08:48:31 -10:00
LedgerReader.hs.disabled debug: move command parsing debug output down to level 8 2020-07-03 11:37:01 -07:00
RulesReader.hs feat:import: resolve matchgroup references in ConditionalBlock scope (#2158) 2024-02-29 21:44:40 +00:00
TimeclockReader.hs imp: Support tsv and ssv prefixes (#2164) 2024-02-08 06:44:44 -10:00
TimedotReader.hs imp: Support tsv and ssv prefixes (#2164) 2024-02-08 06:44:44 -10:00