summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-12-21 22:40:41 +0300
committerdefanor <defanor@uberspace.net>2017-12-21 22:40:41 +0300
commit7019a437de75a096ecaa52d8e7b1a9278c17f16d (patch)
treedaa5ef60553a141049306376d04be1393a9916fa
parentac6545eb9bd697291a18ef5164653b77cb587047 (diff)
downloadpancake-7019a437de75a096ecaa52d8e7b1a9278c17f16d.zip
pancake-7019a437de75a096ecaa52d8e7b1a9278c17f16d.tar.gz
pancake-7019a437de75a096ecaa52d8e7b1a9278c17f16d.tar.bz2
Use a separate breadcrumb for spacing between blocks
-rw-r--r--Pancake/Rendering.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Pancake/Rendering.hs b/Pancake/Rendering.hs
index 8c5b900..e5d03c4 100644
--- a/Pancake/Rendering.hs
+++ b/Pancake/Rendering.hs
@@ -546,10 +546,10 @@ renderBlocks = renderBlocks' 0
renderBlocks' _ [] = pure ()
renderBlocks' n [b] = withBreadcrumb n $ renderBlock b
renderBlocks' n (b1:bs@(b2:_)) = do
- withBreadcrumb n $ do
- renderBlock b1
- when (skipAfter b1 || skipBefore b2) $ storeLines [[]]
- renderBlocks' (n + 1) bs
+ withBreadcrumb n $ renderBlock b1
+ when (skipAfter b1 || skipBefore b2) $
+ withBreadcrumb (n + 1) $ storeLines [[]]
+ renderBlocks' (n + 2) bs
-- | Renders a document.
renderDoc :: Int