title: How to preserve whitespace indentation of text enclosed in HTML <pre> tags excluding the current indentation level of the <pre> tag in the document?
body: <p>I'm trying to display my code on a website but I'm having problems preserving the whitespace indentation correctly.</p>
  
  <p>For instance given the following snippet:</p>
  
  <pre><code>&lt;html&gt;
   &lt;body&gt;
     Here is my code:
     &lt;pre&gt;
       def some_funtion
         return 'Hello, World!'
       end
     &lt;/pre&gt;
   &lt;body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is displayed in the browser as:</p>
  
  <pre><code>Here is my code:
  
       def some_funtion
         return 'Hello, World!'
       end
  </code></pre>
  
  <p>When I would like it displayed as:</p>
  
  <pre><code>Here is my code:
  
  def some_funtion
   return 'Hello, World!'
  end
  </code></pre>
  
  <p>The difference is that that current indentation level of the HTML pre tag is being added to the indentation of the code. I'm using nanoc as a static website generator and I'm using google prettify to also add syntax highlighting.</p>
  
  <p>Can anyone offer any suggestions? </p>