Skip to content

Commit

Permalink
cln: csv: small rename
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Dec 9, 2021
1 parent bb24911 commit 0d83bdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hledger-lib/Hledger/Read/CsvReader.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,8 @@ renderTemplate rules record t = maybe t mconcat $ parseMaybe
<|> replaceCsvFieldReference rules record <$> referencep)
t
where
referencep = liftA2 T.cons (char '%') (takeWhile1P (Just "reference") isDescriptorChar) :: Parsec CustomErr Text Text
isDescriptorChar c = isAscii c && (isAlphaNum c || c == '_' || c == '-')
referencep = liftA2 T.cons (char '%') (takeWhile1P (Just "reference") isFieldNameChar) :: Parsec CustomErr Text Text
isFieldNameChar c = isAscii c && (isAlphaNum c || c == '_' || c == '-')

-- | Replace something that looks like a reference to a csv field ("%date" or "%1)
-- with that field's value. If it doesn't look like a field reference, or if we
Expand Down

0 comments on commit 0d83bdf

Please sign in to comment.