Skip to content

Commit 47c5230

Browse files
authored
Merge pull request #42 from a1346054/fixes
Trim trailing whitespace
2 parents 2cc4995 + 25ca774 commit 47c5230

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Tldr/App.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ noColorFlag =
7878
(flag' NoColor
7979
(long "no-color" <>
8080
help
81-
"Disable colored output"))
81+
"Disable colored output"))
8282

8383
colorFlags :: Parser (Maybe ColorSetting)
8484
colorFlags = useColorFlag <|> noColorFlag

src/Tldr/App/Handler.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ handleTldrOpts opts@TldrOpts {..} =
7272
About -> handleAboutFlag
7373
ViewPage voptions pages -> do
7474
shouldPerformUpdate <- updateNecessary opts
75-
when shouldPerformUpdate updateTldrPages
75+
when shouldPerformUpdate updateTldrPages
7676
let npage = intercalate "-" pages
7777
locale <-
7878
case languageOption voptions of
@@ -82,7 +82,7 @@ handleTldrOpts opts@TldrOpts {..} =
8282
case fname of
8383
Just path -> do
8484
defColor <- getNoColorEnv
85-
let color = fromMaybe defColor colorSetting
85+
let color = fromMaybe defColor colorSetting
8686
renderPage path stdout color
8787
Nothing ->
8888
if checkLocale locale
@@ -99,13 +99,13 @@ updateNecessary :: TldrOpts -> IO Bool
9999
updateNecessary TldrOpts{..} = do
100100
dataDir <- getXdgDirectory XdgData tldrDirName
101101
dataDirExists <- doesDirectoryExist dataDir
102-
if not dataDirExists
102+
if not dataDirExists
103103
then return True
104104
else do
105105
lastCachedTime <- getModificationTime dataDir
106106
currentTime <- getCurrentTime
107-
let diffExceedsLimit limit
108-
= currentTime `diffUTCTime` lastCachedTime
107+
let diffExceedsLimit limit
108+
= currentTime `diffUTCTime` lastCachedTime
109109
> fromIntegral limit * nominalDay
110110
return $ maybe False diffExceedsLimit autoUpdateInterval
111111

src/Tldr/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import System.Console.ANSI
44

55
data Locale = English | Missing | Other String | Unknown String
66

7-
data ColorSetting = NoColor | UseColor
7+
data ColorSetting = NoColor | UseColor
88
deriving (Eq, Show, Ord, Enum, Bounded)
99

1010
data ConsoleSetting =

test/Spec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ commandTest str = goldenVsFile (str <> " test") (golden str) (output str) (rende
2828
md cmd = prefix <> cmd <> ".md"
2929

3030
gtests :: TestTree
31-
gtests = testGroup "(render test)"
31+
gtests = testGroup "(render test)"
3232
[
3333
commandTest "ls"
3434
, commandTest "ps"

0 commit comments

Comments
 (0)