summaryrefslogtreecommitdiff
path: root/Pancake.hs
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-11-02 15:21:01 +0300
committerdefanor <defanor@uberspace.net>2017-11-02 15:21:01 +0300
commit0bca972ee68bd673a6a4b928f55ccce9c513d05a (patch)
treeced9a867143a07e8b84749077e9dc2656da1d171 /Pancake.hs
parent840a96dec37e3d2847cb038a5aa3843a867b4fd8 (diff)
Prefix headers
Diffstat (limited to 'Pancake.hs')
-rw-r--r--Pancake.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Pancake.hs b/Pancake.hs
index d136509..0c15648 100644
--- a/Pancake.hs
+++ b/Pancake.hs
@@ -433,11 +433,12 @@ renderBlock (P.DefinitionList dl) =
indented =<< readInlines term
mapM_ renderBlocks definition
in mapM_ renderDefinition dl
-renderBlock (P.Header _ attr i) = do
+renderBlock (P.Header level attr i) = do
storeAttr attr
strings <- readInlines i
storeLines [[""]]
- indented $ map (map $ Fg Green . Main.Bold . Main.Underline) strings
+ indented $ map (map (Fg Green) . ([fromString (replicate level '#'), " "] ++)
+ . (map (Main.Bold . Main.Underline))) strings
storeLines [[""]]
renderBlock P.HorizontalRule = do
st <- get