commodity & amount style parser cleanups, part 2
This commit is contained in:
		
							parent
							
								
									9b4b85b4bf
								
							
						
					
					
						commit
						330dfe6891
					
				| @ -133,7 +133,7 @@ nulljournal = Journal { jmodifiertxns = [] | |||||||
|                       } |                       } | ||||||
| 
 | 
 | ||||||
| nullctx :: JournalContext | nullctx :: JournalContext | ||||||
| nullctx = Ctx { ctxYear = Nothing, ctxCommodityAndStyle = Nothing, ctxAccount = [], ctxAliases = [] } | nullctx = Ctx { ctxYear = Nothing, ctxDefaultCommodityAndStyle = Nothing, ctxAccount = [], ctxAliases = [] } | ||||||
| 
 | 
 | ||||||
| journalFilePath :: Journal -> FilePath | journalFilePath :: Journal -> FilePath | ||||||
| journalFilePath = fst . mainfile | journalFilePath = fst . mainfile | ||||||
|  | |||||||
| @ -266,7 +266,7 @@ amountAndCommentWizard EntryState{..} = do | |||||||
|    line $ green $ printf "Amount  %d%s: " pnum (showDefault def) |    line $ green $ printf "Amount  %d%s: " pnum (showDefault def) | ||||||
|     where   |     where   | ||||||
|       parseAmountAndComment = either (const Nothing) Just . parseWithCtx nodefcommodityctx amountandcommentp |       parseAmountAndComment = either (const Nothing) Just . parseWithCtx nodefcommodityctx amountandcommentp | ||||||
|       nodefcommodityctx = (jContext esJournal){ctxCommodityAndStyle=Nothing} |       nodefcommodityctx = (jContext esJournal){ctxDefaultCommodityAndStyle=Nothing} | ||||||
|       amountandcommentp = do |       amountandcommentp = do | ||||||
|         a <- amountp |         a <- amountp | ||||||
|         many spacenonewline |         many spacenonewline | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user