Remove trailing whitespace
This commit is contained in:
parent
db93108027
commit
3a38612d1d
@ -1,4 +1,4 @@
|
||||
module Download (downloadHtmlAvailableDef, downloadHtmlDef) where
|
||||
module Download (downloadHtmlAvailableDef, downloadHtmlDef) where
|
||||
|
||||
import Data.ByteString.Lazy
|
||||
import Network.HTTP.Simple
|
||||
@ -14,7 +14,7 @@ downloadHtmlDef :: String -> String -> IO ByteString
|
||||
downloadHtmlDef n w = do
|
||||
request <- getDefRequest n w
|
||||
downloadFromRequest request
|
||||
|
||||
|
||||
downloadFromRequest :: Request -> IO ByteString
|
||||
downloadFromRequest r = do
|
||||
response <- httpLBS r
|
||||
|
2
Main.hs
2
Main.hs
@ -13,7 +13,7 @@ parse [] = usage
|
||||
parse ("-d":[]) = usage
|
||||
parse ("-d":n:[]) = usage
|
||||
parse ("-d":n:fs) = do
|
||||
htmlResult <- downloadHtmlDef n (head fs)
|
||||
htmlResult <- downloadHtmlDef n (head fs)
|
||||
let n' = read n :: Int
|
||||
printDef (E.decodeUtf8 htmlResult) n'
|
||||
parse fs = do
|
||||
|
@ -26,7 +26,7 @@ getTypeString :: WordType -> String
|
||||
getTypeString (WordType s) = s
|
||||
|
||||
renderFullDef :: WordFullDef -> String
|
||||
renderFullDef (WordFullDef wordDefHeader wordSentenceList) =
|
||||
renderFullDef (WordFullDef wordDefHeader wordSentenceList) =
|
||||
renderHeader wordDefHeader ++ "\n\n" ++ renderWordSentenceList wordSentenceList
|
||||
|
||||
renderHeader :: WordDefHeader -> String
|
||||
|
Loading…
Reference in New Issue
Block a user