journal: fix breakage in auto posting rule parser (#745)
I was negligent and did not test enough. This should ignore transaction comments in auto posting rules more safely. It also adds support for trailing comments on the first line of auto posting rules, which previously were misparsed as part of the query.
This commit is contained in:
		
							parent
							
								
									e2f5e98926
								
							
						
					
					
						commit
						d9d94e2cf6
					
				| @ -474,8 +474,8 @@ modifiertransactionp :: JournalParser m ModifierTransaction | ||||
| modifiertransactionp = do | ||||
|   char '=' <?> "modifier transaction" | ||||
|   lift (skipMany spacenonewline) | ||||
|   querytxt <- T.pack <$> lift restofline  -- TODO should not consume a same-line comment | ||||
|   (_cmt, _tags) <- lift transactioncommentp   -- TODO apply these to modified txns ? | ||||
|   querytxt <- lift $ T.strip <$> descriptionp | ||||
|   (_comment, _tags) <- lift transactioncommentp   -- TODO apply these to modified txns ? | ||||
|   postings <- postingsp Nothing | ||||
|   return $ ModifierTransaction querytxt postings | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user