From e9dc5aa02e0d2503e1606da5b119717612804a56 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 13 Jul 2008 22:50:57 +0000 Subject: Code cleanup in Text.Pandoc.Blocks to eliminate -Wall warnings. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1309 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Blocks.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Text') diff --git a/Text/Pandoc/Blocks.hs b/Text/Pandoc/Blocks.hs index cfc22cb3e..122931773 100644 --- a/Text/Pandoc/Blocks.hs +++ b/Text/Pandoc/Blocks.hs @@ -57,7 +57,7 @@ instance Show TextBlock where breakLines :: Int -- ^ Maximum length of lines. -> [String] -- ^ List of lines. -> [String] -breakLines width [] = [] +breakLines _ [] = [] breakLines width (l:ls) = if length l > width then (take width l):(breakLines width ((drop width l):ls)) @@ -93,9 +93,9 @@ hPad :: Int -- ^ Desired width. -> String -- ^ String to pad. -> String hPad width line = - let lineLength = length line - in if lineLength <= width - then line ++ replicate (width - lineLength) ' ' + let linelen = length line + in if linelen <= width + then line ++ replicate (width - linelen) ' ' else take width line -- | Concatenates a list of @TextBlock@s into a new @TextBlock@ in @@ -116,6 +116,7 @@ hcatBlocks ((TextBlock width1 height1 lns1):xs) = hsepBlocks :: [TextBlock] -> TextBlock hsepBlocks = hcatBlocks . (intersperse (TextBlock 1 1 [" "])) +isWhitespace :: Char -> Bool isWhitespace x = x `elem` " \t" -- | Left-aligns the contents of a @TextBlock@ within the block. -- cgit v1.2.3