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 | ||||
| make it easy to treat your journal like an org-mode outline in emacs.) | ||||
| 
 | ||||
| Also, anything between | ||||
| [`comment` and `end comment` directives](#multi-line-comments) is a | ||||
| (multi-line) comment. | ||||
| Also, anything between [`comment` and `end comment` directives](#multi-line-comments) is a (multi-line) comment. | ||||
| If there is no `end comment`, the comment extends to the end of the file. | ||||
| 
 | ||||
| You can attach comments to a transaction by writing them after the | ||||
| description and/or indented on the following lines (before the | ||||
|  | ||||
| @ -995,7 +995,7 @@ multilinecommentp = do | ||||
|   string "comment" >> many spacenonewline >> newline | ||||
|   go | ||||
|   where | ||||
|     go = try (string "end comment" >> newline >> return ()) | ||||
|     go = try (eof <|> (string "end comment" >> newline >> return ())) | ||||
|          <|> (anyLine >> go) | ||||
|     anyLine = anyChar `manyTill` newline | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user