diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-04-25 00:29:58 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-04-25 00:29:58 +0000 |
commit | df5244fd486c20fa6125d371898c211906eed58b (patch) | |
tree | 2b60080ad021b62be57a367bf0c432fa8e025349 /src/Text/Pandoc/Writers/Markdown.hs | |
parent | 2ab7640df663ece8dcf4cd68d36b92a3c45558a4 (diff) | |
download | pandoc-df5244fd486c20fa6125d371898c211906eed58b.tar.gz |
HTML writer: wrap sections in divs. Resolves Issue #70.
+ hierarchicalize has been rationalized; it builds a hierarchical
representation of the document from the headers, and simultaneously
gives each section a unique identifier based on the heading title.
+ Identifiers are now attached to the divs rather than
to the headers themselves.
+ Table of content backlinks go to the beginning of the table, rather
than to the section reference that was clicked. This seems better.
+ Code for constructing identifiers has been moved to Text.Pandoc.Shared
from the HTML writer, since it is now consumed only by
hierarchicalize.
+ In --strict mode, pandoc just prints bare headings, as before
(unless --toc has been specified).
+ In s5 output, it does not wrap sections in divs, as that seems to
confuse the s5 javascript.
+ Test suite updated accordingly.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1562 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index bebb88a76..f376ac0c6 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -138,7 +138,7 @@ tableOfContents opts headers = -- | Converts an Element to a list item for a table of contents, elementToListItem :: Element -> [Block] elementToListItem (Blk _) = [] -elementToListItem (Sec headerText subsecs) = [Plain headerText] ++ +elementToListItem (Sec _ _ headerText subsecs) = [Plain headerText] ++ if null subsecs then [] else [BulletList $ map elementToListItem subsecs] |