File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ module MyPrelude (
1818 mergeList ,
1919 listDisplay ,
2020 getOrDft ,
21- replace ,
2221 forceRight ,
2322 forceJust ,
2423 LoggerM ,
@@ -126,9 +125,6 @@ getOrDft :: (Default a) => Maybe a -> a
126125getOrDft (Just v) = v
127126getOrDft Nothing = def
128127
129- replace :: Lens' a b -> a -> a -> a
130- replace l base new = base & l .~ new ^. l
131-
132128getEnvDft :: (MonadIO m ) => String -> String -> m String
133129getEnvDft name dft = liftIO $ SB. getEnvDefault name dft
134130
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module Types.Record where
33import Data.ByteString.Builder (byteString )
44import Hledger (AccountName , Status (.. ))
55import MyPrelude
6+ import RIO.Text.Partial qualified as T'
67
78separator :: Builder
89separator = " ;"
@@ -41,9 +42,9 @@ makeLenses ''ImportComment
4142instance Display ImportComment where
4243 display (ImportComment {.. }) =
4344 display
44- -- add quotes to escape separator
45- $ show
46- $ show
45+ $ T'. replace " \" " " "
46+ $ T'. replace " ; " " | "
47+ $ tshow
4748 $ display (maybe " " (<> " , " ) _icStr)
4849 <> displayWithSep " , " ((\ (tag, txt) -> tag <> " : " <> txt) <$> _icTags)
4950
You can’t perform that action at this time.
0 commit comments