Skip to content
Commit df30e97c authored by Raniere Silva's avatar Raniere Silva
Browse files

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>
parent 6753e095
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment