title: Github Markdown - rendering code blocks with XML & HTML - kramdown vs redcarpet
body: <p>I'm running into some unusual errors in my git site.</p>
  
  <p>NOTE: I am using Kramdown + highlight.js to highlight code. </p>
  
  <p>Below is a lesson that I am working on. In this lesson, I need to render 
  <code>EML</code> (similar to XML) in code blocks. I am using kramdown.
  I also want to render HTML in code blocks - for example I need a code block that explains how to add an include file:</p>
  
  <pre><code>{% include _toc.html %}
  </code></pre>
  
  <p>Case in point - the lesson below:
  <a href="http://neoninc.github.io/NEON-DataSkills-Lesson-Development/R/EML/" rel="nofollow">http://neoninc.github.io/NEON-DataSkills-Lesson-Development/R/EML/</a></p>
  
  <p>git url
  <a href="https://github.com/NEONInc/NEON-DataSkills-Lesson-Development/blob/gh-pages/_posts/EML/2015-12-12-Intro-to-EML.md" rel="nofollow">https://github.com/NEONInc/NEON-DataSkills-Lesson-Development/blob/gh-pages/_posts/EML/2015-12-12-Intro-to-EML.md</a></p>
  
  <p>Oddly enough when JEKYLL builds the page, it is running the code blocks containing XML and HTML. </p>
  
  <p>I have tried:</p>
  
  <pre><code>&lt;code&gt;
  &lt;creator&gt;
        &lt;individualName&gt;
          &lt;givenName&gt;Emery&lt;/givenName&gt;
          &lt;surName&gt;Boose&lt;/surName&gt;
        &lt;/individualName&gt;
  &lt;/creator&gt;
  &lt;/code&gt;
  </code></pre>
  
  <p>This renders the closing <code>&lt;/code&gt;</code> tag on the page which is weird. If i don't use the code tag, then jekyll attempts to PARSE the XML.</p>
  
  <pre><code>&lt;pre&gt;&lt;code class="xml"&gt;
  &lt;creator&gt;
            &lt;individualName&gt;
              &lt;givenName&gt;Emery&lt;/givenName&gt;
              &lt;surName&gt;Boose&lt;/surName&gt;
            &lt;/individualName&gt;
  &lt;/creator&gt;
  &lt;/code&gt;&lt;/pre&gt;
  </code></pre>
  
  <p>This still attempts to parse  and  as HTML tags.</p>
  
  <p>I have tried to switch to redcarpet. However, redcarpet breaks my breakout boxes which I code as follows: using <code>{: .notice }</code> to apply a style to the div.</p>
  
  <pre><code>&lt;i class="fa fa-star"&gt;&lt;/i&gt; **Data Tip:**  To figure out the full slot string, 
  in `RStudio` we can use Tab Complete as we type.
  </code></pre>
  
  <p>FINALLY -- My workflow is knitting from RMD to md so adding custom code to each code block (pre and code) is problematic when i build. </p>
  
  <p>In short - I'm having a hard time finding a solution that </p>
  
  <ol>
  <li>Allows code blocks with HTML / XML</li>
  <li>Allows me to apply a class/ id to my breakout divs.
  {: .notice }</li>
  </ol>
  
  <p>Thank you very much for any feedback / guidance with this issue.
  Leah </p>