Skip to content

Commit 215ef5e

Browse files
committed
fix:check accounts: don't garble non-ascii account names in errors [#2469]
This regressed in 1.27 or so.
1 parent bde323b commit 215ef5e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

hledger-lib/Hledger/Data/JournalChecks.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ journalCheckAccounts j = mapM_ checkacct (journalPostings j)
6363
"%s:%d:"
6464
,"%s"
6565
,"Strict account checking is enabled, and"
66-
,"account %s has not been declared."
66+
,"account \"%s\" has not been declared."
6767
,"Consider adding an account directive. Examples:"
6868
,""
6969
,"account %s"
70-
]) f l ex (show a) a
70+
]) f l ex a a
7171
where
7272
(f,l,_mcols,ex) = makePostingAccountErrorExcerpt p
7373

hledger/test/errors/accounts.j

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env -S hledger check accounts -f
22

33
2022/1/1
4-
(a) 1
4+
(ß) 1

hledger/test/errors/accounts.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
$$$ hledger check accounts -f accounts.j
22
>>>2 /Error: .*accounts.j:4:
33
\| 2022-01-01
4-
4 \| \(a\) 1
4+
4 \| \(ß\) 1
55
\| \^
66

77
Strict account checking is enabled, and
8-
account "a" has not been declared.
8+
account "ß" has not been declared.
99
Consider adding an account directive. Examples:
1010

11-
account a
11+
account ß
1212
/
1313
>>>= 1

0 commit comments

Comments
 (0)