From d1769d9d62c24f51cdca997ea851b2433fc318a4 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 11 Jun 2015 09:59:07 -0700 Subject: [PATCH] journal: allow journal entries with no postings We now parse, and also print, posting-less journal entries, as I proposed on the lists. These are not real General Journal entries/transactions, but here is my rationale: - Ledger and beancount parse them - if we parse them, we should print them - they provide a natural way to record and report non-transaction events - most of all, they permit more gradual introduction and learning of the concepts. Eg a beginner can keep a simple journal even before learning about accounts and postings. --- hledger-lib/Hledger/Read/JournalReader.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Read/JournalReader.hs b/hledger-lib/Hledger/Read/JournalReader.hs index dbc0919c0..a7ff55b04 100644 --- a/hledger-lib/Hledger/Read/JournalReader.hs +++ b/hledger-lib/Hledger/Read/JournalReader.hs @@ -550,7 +550,7 @@ codep = try (do { many1 spacenonewline; char '(' "codep"; code <- anyChar `m -- Parse the following whitespace-beginning lines as postings, posting tags, and/or comments. postings :: Stream [Char] m Char => ParsecT [Char] JournalContext m [Posting] -postings = many1 (try postingp) "postings" +postings = many (try postingp) "postings" -- linebeginningwithspaces :: Stream [Char] m Char => ParsecT [Char] JournalContext m String -- linebeginningwithspaces = do