journal: make "end comment" optional, like ledger
The "comment" directive longer requires an "end comment", and will extend to the end of the file(s) without it.
This commit is contained in:
parent
a2f344f6d9
commit
939f7184c9
@ -530,9 +530,8 @@ Lines in the journal beginning with a semicolon (`;`) or hash (`#`) or
|
|||||||
asterisk (`*`) are comments, and will be ignored. (Asterisk comments
|
asterisk (`*`) are comments, and will be ignored. (Asterisk comments
|
||||||
make it easy to treat your journal like an org-mode outline in emacs.)
|
make it easy to treat your journal like an org-mode outline in emacs.)
|
||||||
|
|
||||||
Also, anything between
|
Also, anything between [`comment` and `end comment` directives](#multi-line-comments) is a (multi-line) comment.
|
||||||
[`comment` and `end comment` directives](#multi-line-comments) is a
|
If there is no `end comment`, the comment extends to the end of the file.
|
||||||
(multi-line) comment.
|
|
||||||
|
|
||||||
You can attach comments to a transaction by writing them after the
|
You can attach comments to a transaction by writing them after the
|
||||||
description and/or indented on the following lines (before the
|
description and/or indented on the following lines (before the
|
||||||
|
|||||||
@ -995,7 +995,7 @@ multilinecommentp = do
|
|||||||
string "comment" >> many spacenonewline >> newline
|
string "comment" >> many spacenonewline >> newline
|
||||||
go
|
go
|
||||||
where
|
where
|
||||||
go = try (string "end comment" >> newline >> return ())
|
go = try (eof <|> (string "end comment" >> newline >> return ()))
|
||||||
<|> (anyLine >> go)
|
<|> (anyLine >> go)
|
||||||
anyLine = anyChar `manyTill` newline
|
anyLine = anyChar `manyTill` newline
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user