git.iko.soy/typeable/pandoc
on master help sign in
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

commite9dc5aa02e0d2503e1606da5b119717612804a56 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 13 Jul 2008, 22:50 (18 years ago) parentb973bc9
1 file changed+5−4
Text/Pandoc/Blocks.hs+5−4
Text/Pandoc/Blocks.hs+5−4
@@ -57,7 +57,7 @@ instance Show TextBlock where
5757breakLines :: Int -- ^ Maximum length of lines.
5858 -> [String] -- ^ List of lines.
5959 -> [String]
60−breakLines width [] = []
60+breakLines _ [] = []
6161breakLines width (l:ls) =
6262 if length l > width
6363 then (take width l):(breakLines width ((drop width l):ls))
@@ -93,9 +93,9 @@ hPad :: Int -- ^ Desired width.
9393 -> String -- ^ String to pad.
9494 -> String
9595hPad width line =
96− let lineLength = length line
97− in if lineLength <= width
98− then line ++ replicate (width - lineLength) ' '
96+ let linelen = length line
97+ in if linelen <= width
98+ then line ++ replicate (width - linelen) ' '
9999 else take width line
100100
101101-- | Concatenates a list of @TextBlock@s into a new @TextBlock@ in
@@ -116,6 +116,7 @@ hcatBlocks ((TextBlock width1 height1 lns1):xs) =
116116hsepBlocks :: [TextBlock] -> TextBlock
117117hsepBlocks = hcatBlocks . (intersperse (TextBlock 1 1 [" "]))
118118
119+isWhitespace :: Char -> Bool
119120isWhitespace x = x `elem` " \t"
120121
121122-- | Left-aligns the contents of a @TextBlock@ within the block.