git.iko.soy/typeable/pandoc
on master help sign in
Moved isHeaderBlock from Text.Pandoc.Writers.HTML

to Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@656 788f1e2b-df1e-0410-8736-df70ead52e1b

commit489a2bb1d9d9f8473f5e11cb6c74b5c6f5e9c866 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 9 Jul 2007, 00:50 (19 years ago) parent2d4a22d
2 files changed+6−5
src/Text/Pandoc/Shared.hs+6 src/Text/Pandoc/Writers/HTML.hs−5
src/Text/Pandoc/Shared.hs+6
@@ -63,6 +63,7 @@ module Text.Pandoc.Shared (
6363 compactify,
6464 Element (..),
6565 hierarchicalize,
66+ isHeaderBlock,
6667 -- * Writer options
6768 WriterOptions (..),
6869 defaultWriterOptions,
@@ -390,6 +391,11 @@ hierarchicalize (block:rest) =
390391 (hierarchicalize rest')
391392 x -> (Blk x):(hierarchicalize rest)
392393
394+-- | True if block is a Header block.
395+isHeaderBlock :: Block -> Bool
396+isHeaderBlock (Header _ _) = True
397+isHeaderBlock _ = False
398+
393399-- | Options for writers
394400data WriterOptions = WriterOptions
395401 { writerStandalone :: Bool -- ^ Include header and footer
src/Text/Pandoc/Writers/HTML.hs−5
@@ -87,11 +87,6 @@ writeHtml opts (Pandoc (Meta tit authors date) blocks) =
8787 then head +++ (body thebody)
8888 else thebody
8989
90−-- | True if block is a Header block.
91−isHeaderBlock :: Block -> Bool
92−isHeaderBlock (Header _ _) = True
93−isHeaderBlock _ = False
94−
9590-- | Construct table of contents from list of header blocks and identifiers.
9691-- Assumes there are as many identifiers as header blocks.
9792tableOfContents :: WriterOptions -> [Block] -> Ids -> Html