mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
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.
This commit is contained in:
parent
049baed4d8
commit
d1769d9d62
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user