hledger/hledger-lib
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
..
Hledger feat:import: resolve matchgroup references in ConditionalBlock scope (#2158) 2024-02-29 21:44:40 +00:00
other/ledger-parse cln: hlint: Clean up Functor related hlint warnings, and NOINLINE warning. 2021-08-27 06:13:56 -10:00
test test: doctest cleanups, use latest 2021-07-20 20:38:39 -10:00
Text lib: add Show to Table render functions for debugging 2023-10-17 11:46:00 +01:00
.date.m4 ;doc: update manuals 2024-02-18 14:59:10 -10:00
.ghci tools: .ghci for each package, sets shorter prompt 2016-04-15 16:06:45 -07:00
.version ;pkg: bump version to 1.32.99 2023-12-02 09:09:07 -10:00
.version.m4 ;pkg: bump version to 1.32.99 2023-12-02 09:09:07 -10:00
CHANGES.md ;doc: update changelogs 2024-01-28 02:34:54 -10:00
hledger-lib.cabal ;cabal: update cabal files 2024-02-28 15:34:11 -10:00
Hledger.hs doc:code: add Jargon section; describe styling/precision in detail (precisiongeddon) 2023-11-08 13:59:18 -08:00
LICENSE split off hledger-lib package, containing core types & utils 2010-03-22 01:44:59 +00:00
package.yaml pkg: require safe >=0.3.20, for ghc 9.8 head/tail helpers 2024-02-28 14:39:53 -10:00
README.md ;doc: more tweaks to package readmes, hackage descriptions 2020-03-22 10:49:02 -07:00
Setup.hs Revert "remove Setup.hs files again, fixing a yesod devel warning" 2014-05-24 13:39:09 -07:00

hledger-lib

A reusable library containing hledgers 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.