diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-07-13 22:50:57 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-07-13 22:50:57 +0000 |
commit | e9dc5aa02e0d2503e1606da5b119717612804a56 (patch) | |
tree | ffe2c13287d053bf80c6de4f980e4de56e272ce5 /Text/Pandoc | |
parent | b973bc9e3ee420fc85433b2bf38fff49409c0016 (diff) | |
download | pandoc-e9dc5aa02e0d2503e1606da5b119717612804a56.tar.gz |
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
Diffstat (limited to 'Text/Pandoc')
-rw-r--r-- | Text/Pandoc/Blocks.hs | 9 |
1 files changed, 5 insertions, 4 deletions
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. |