aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-03-17 20:23:47 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-03-17 20:23:47 +0000
commit571c3b41737f3a331706833adeb8241d93cef10c (patch)
tree58d6690630f686c7ae7b042175561045e7aced7e /src
parent9b3d5d88c2cb4b9779ada57abf2d28b71aad4bea (diff)
downloadpandoc-571c3b41737f3a331706833adeb8241d93cef10c.tar.gz
Removed Blank block element as unnecessary.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@578 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Definition.hs1
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
-rw-r--r--src/Text/Pandoc/Readers/RST.hs2
-rw-r--r--src/Text/Pandoc/Shared.hs1
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs1
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs1
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs1
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs5
-rw-r--r--src/Text/Pandoc/Writers/RST.hs1
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs1
-rw-r--r--src/Text/ParserCombinators/Pandoc.hs7
11 files changed, 4 insertions, 19 deletions
diff --git a/src/Text/Pandoc/Definition.hs b/src/Text/Pandoc/Definition.hs
index 2ccc5931a..5eec6bafe 100644
--- a/src/Text/Pandoc/Definition.hs
+++ b/src/Text/Pandoc/Definition.hs
@@ -48,7 +48,6 @@ data Alignment = AlignLeft
-- | Block element.
data Block
= Plain [Inline] -- ^ Plain text, not a paragraph
- | Blank -- ^ A blank line
| Null -- ^ Nothing
| Para [Inline] -- ^ Paragraph
| Key [Inline] Target -- ^ Reference key: name (inlines) and 'Target'
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 8bf9ecead..a2e84e8c2 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -191,7 +191,7 @@ parseBlocks = manyTill block eof
block = choice [ header, table, codeBlock, note, referenceKey, hrule, list,
blockQuote, htmlBlock, rawLaTeXEnvironment', para,
- plain, blankBlock, nullBlock ] <?> "block"
+ plain, nullBlock ] <?> "block"
--
-- header blocks
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index b42deb44c..a3de0a2ea 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -126,7 +126,7 @@ parseBlocks = manyTill block eof
block = choice [ codeBlock, rawHtmlBlock, rawLaTeXBlock, blockQuote,
referenceKey, imageBlock, unknownDirective, header,
hrule, list, fieldList, lineBlock, para, plain,
- blankBlock, nullBlock ] <?> "block"
+ nullBlock ] <?> "block"
--
-- field list
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 61b621eda..526263c4a 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -432,7 +432,6 @@ keyTable [] = ([],[])
keyTable ((Key ref target):lst) = (((ref, target):table), rest)
where (table, rest) = keyTable lst
keyTable (Null:lst) = keyTable lst -- get rid of Nulls
-keyTable (Blank:lst) = keyTable lst -- get rid of Blanks
keyTable (other:lst) = (table, (other:rest))
where (table, rest) = keyTable lst
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs
index 0c1d35e63..87eba9ad0 100644
--- a/src/Text/Pandoc/Writers/Docbook.hs
+++ b/src/Text/Pandoc/Writers/Docbook.hs
@@ -133,7 +133,6 @@ listItemToDocbook opts item =
-- | Convert a Pandoc block element to Docbook.
blockToDocbook :: WriterOptions -> Block -> Doc
-blockToDocbook opts Blank = text ""
blockToDocbook opts Null = empty
blockToDocbook opts (Plain lst) = wrap opts lst
blockToDocbook opts (Para lst) =
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 5f42679b4..6b42c010f 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -131,7 +131,6 @@ obfuscateString = concatMap obfuscateChar
-- | Convert Pandoc block element to HTML.
blockToHtml :: WriterOptions -> Block -> Html
-blockToHtml opts Blank = noHtml
blockToHtml opts Null = noHtml
blockToHtml opts (Plain lst) = inlineListToHtml opts lst
blockToHtml opts (Para lst) = paragraph $ inlineListToHtml opts lst
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index d72c915d5..de1b7e207 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -102,7 +102,6 @@ deVerb (other:rest) = other:(deVerb rest)
blockToLaTeX :: [Block] -- ^ List of note blocks to use in resolving note refs
-> Block -- ^ Block to convert
-> String
-blockToLaTeX notes Blank = "\n"
blockToLaTeX notes Null = ""
blockToLaTeX notes (Plain lst) = inlineListToLaTeX notes lst ++ "\n"
blockToLaTeX notes (Para lst) = (inlineListToLaTeX notes lst) ++ "\n\n"
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 13e5aca89..687f6e6c4 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -75,8 +75,8 @@ formatKeys [] = []
formatKeys [x] = [x]
formatKeys ((Key x1 y1):(Key x2 y2):rest) =
(Key x1 y1):(formatKeys ((Key x2 y2):rest))
-formatKeys ((Key x1 y1):rest) = (Key x1 y1):Blank:(formatKeys rest)
-formatKeys (x:(Key x1 y1):rest) = x:Blank:(formatKeys ((Key x1 y1):rest))
+formatKeys ((Key x1 y1):rest) = (Key x1 y1):(Plain [Str ""]):(formatKeys rest)
+formatKeys (x:(Key x1 y1):rest) = x:(Plain [Str ""]):(formatKeys ((Key x1 y1):rest))
formatKeys (x:rest) = x:(formatKeys rest)
-- | Convert bibliographic information into Markdown header.
@@ -103,7 +103,6 @@ dateToMarkdown str = text "% " <> text (escapeString str)
blockToMarkdown :: Int -- ^ Tab stop
-> Block -- ^ Block element
-> Doc
-blockToMarkdown tabStop Blank = text ""
blockToMarkdown tabStop Null = empty
blockToMarkdown tabStop (Plain lst) = wrappedMarkdown lst
blockToMarkdown tabStop (Para lst) = (wrappedMarkdown lst) <> (text "\n")
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index b6802ffa2..27d1a596a 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -112,7 +112,6 @@ dateToRST str = text ":Date: " <> text (escapeString str) <> char '\n'
blockToRST :: Int -- ^ tab stop
-> Block -- ^ block element to convert
-> (Doc, Doc) -- ^ first element is text, second is references for end of file
-blockToRST tabStop Blank = (text "\n", empty)
blockToRST tabStop Null = (empty, empty)
blockToRST tabStop (Plain lst) = wrappedRST lst
blockToRST tabStop (Para [TeX str]) = -- raw latex block
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index 86991368b..2dddb857b 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -146,7 +146,6 @@ blockToRTF :: [Block] -- ^ list of note blocks
-> Int -- ^ indent level
-> Block -- ^ block to convert
-> String
-blockToRTF notes indent Blank = rtfPar indent 0 ""
blockToRTF notes indent Null = ""
blockToRTF notes indent (Plain lst) =
rtfCompact indent 0 (inlineListToRTF notes lst)
diff --git a/src/Text/ParserCombinators/Pandoc.hs b/src/Text/ParserCombinators/Pandoc.hs
index ced0cb7ca..5b1742975 100644
--- a/src/Text/ParserCombinators/Pandoc.hs
+++ b/src/Text/ParserCombinators/Pandoc.hs
@@ -38,7 +38,6 @@ module Text.ParserCombinators.Pandoc (
blanklines,
escaped,
enclosed,
- blankBlock,
nullBlock,
stringAnyCase,
parseFromStr
@@ -59,12 +58,6 @@ nullBlock = do
anyChar
return Null
--- | Parses one or more blank lines; returns 'Blank'.
-blankBlock :: GenParser Char st Block
-blankBlock = do
- blanklines
- return Blank
-
-- | Parses a space or tab.
spaceChar :: CharParser st Char
spaceChar = oneOf " \t"