diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-19 14:43:42 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-19 14:43:42 -0700 |
commit | 7678c48122bb9bb7041b75ddc33061b93cbcdbb2 (patch) | |
tree | 0c391a2db813de0f247037f4517e654131f84042 /src | |
parent | b0c8ba88a773e18581f088c5473351c7ba30af7e (diff) | |
download | pandoc-7678c48122bb9bb7041b75ddc33061b93cbcdbb2.tar.gz |
Hlint suggestion.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Txt2Tags.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs index f27a3fc2c..d355a4b55 100644 --- a/src/Text/Pandoc/Readers/Txt2Tags.hs +++ b/src/Text/Pandoc/Readers/Txt2Tags.hs @@ -56,12 +56,13 @@ getT2TMeta = do outp <- fromMaybe "" <$> P.getOutputFile curDate <- formatTime defaultTimeLocale "%F" <$> P.getZonedTime curMtime <- catchError - ((nonEmpty <$> mapM P.getModificationTime inps) >>= - \case + (mapM P.getModificationTime inps >>= + (\case Nothing -> formatTime defaultTimeLocale "%T" <$> P.getZonedTime Just ts -> return $ formatTime defaultTimeLocale "%T" $ maximum ts) + . nonEmpty) (const (return "")) return $ T2TMeta (T.pack curDate) (T.pack curMtime) (intercalate ", " inps) outp |