From df30e97ca64ff9f1acd7a6410d679847b35e73fb Mon Sep 17 00:00:00 2001
From: Raniere Silva <raniere@ime.unicamp.br>
Date: Sun, 16 Nov 2014 12:58:25 -0200
Subject: [PATCH] Fix template layout

The body variable at Pandoc template **must** not be indented
because the indentation will propagate into the HTML.

Example:

    $ cat page.html
    <!DOCTYPE html>
    <html>
      <body>
        $body$
      </body>
    </html>
    $ pandoc -s -t html --template=page -o sample.html sample.md
    $ cat sample.html
    <!DOCTYPE html>
    <html>
      <body>
        <pre><code>def foo():
            return None</code></pre>
      </body>
    </html>

Solution:

    $ cat fix.html
    <!DOCTYPE html>
    <html>
      <body>
    $body$
      </body>
    </html>
    $ pandoc -s -t html --template=fix -o sample-fix.html sample.md
    $ cat sample-fix.html
    <!DOCTYPE html>
    <html>
      <body>
    <pre><code>def foo():
        return None</code></pre>
      </body>
    </html>
---
 _layouts/page.html   | 2 +-
 _layouts/slides.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/_layouts/page.html b/_layouts/page.html
index 0035fb4..6607cab 100644
--- a/_layouts/page.html
+++ b/_layouts/page.html
@@ -13,7 +13,7 @@
         <div class="span10 offset1">
           <h1 class="title">$title$</h1>
           $if(subtitle)$<h2 class="subtitle">$subtitle$</h2>$endif$
-          $body$
+$body$
         </div>
       </div>
       $footer$
diff --git a/_layouts/slides.html b/_layouts/slides.html
index 581bc99..6171862 100644
--- a/_layouts/slides.html
+++ b/_layouts/slides.html
@@ -33,7 +33,7 @@
   <div class="deck-container">
 
     <!-- Begin slides. Just make elements with a class of slide. -->
-    $body$
+$body$
     <!-- End slides. -->
 
     <!-- Begin extension snippets. Add or remove as needed. -->
-- 
GitLab