Skip to content

1.42: & in CSV if rules broke #2352

@gassmatt

Description

@gassmatt

& in the regex expression of an if block raises error on CSV import unless the & is followed by a conditional block. Escaping with backslashes or enclosing & in a regex group expression (e.g., [ \&]*) has no effect.

Example CSV rule file

if
%description STOP \& SHOP
    account2 Expenses:Food and Supplies

Error Output

hledger: Error: ...chase-visa.rules:137:21:
    |
137 | %description STOP \& SHOP
    |                     ^
unexpected space
expecting conditional block

I'm using hledger-flow import and hledger 1.42, mac-aarch64. I did not have this error prior to 1.42.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.affects4-manyAffects potentially a significant number of users.annoyance4-majorMajor usability/doc bug, or any regression or crash.bountyThar's some kind o' loot on offer..csvThe csv file format, csv output format, or generally CSV-related.docsDocumentation-related.regressionA backwards step, indicating a weakness in our QA. We don't like these.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions