~jleightcap/hhtml

e12212a9d3c94fa4e8ec82be43f47687b801f25a — jleightcap 4 months ago 9ca75cd
compiling order for indented ToC
1 files changed, 2 insertions(+), 3 deletions(-)

M src/Html/Compile.hs
M src/Html/Compile.hs => src/Html/Compile.hs +2 -3
@@ 18,11 18,10 @@ htmlCompile doc =
toc :: [AST] -> Html.Structure
toc as =
  concat
    [ let headerText = (convertTexts h)
    [ let headertext = convertTexts h
       in (Html.p_indent_
             (n - 1)
             (convertTexts
                [Plain "- ", Link [Italic [Plain headerText]] ("#" ++ headerText)]))
             (convertTexts [Plain "- ", Link [Italic h] ("#" ++ headertext)]))
    | (Header n h) <- as
    ]