title: escaping raw html in rmarkdown
body: <p>In R Markdown, with html output, I want to use the following raw HTML code, together with some R Markdown code to include an image in a grid.</p>
  
  <p>The HTML code starting with "&lt;" appears to propagate to HTML output without problems. However, HTML code such as "::before" gets converted to <code>&lt;p&gt;</code>::before<code>&lt;/p&gt;</code> which is not what I want. </p>
  
  <p>How can I specify to R Markdown that I want to 'escape' certain pieces of code, such as "::before" and "::after", preventing the automatic encapsulation of them in <code>&lt;p&gt;</code> tags?</p>
  
  <pre><code>&lt;div class = "row", id = "abc"&gt;
  ::before
  &lt;div class = "col-md-4"&gt;
  ![](images/logo.png){ style="height: 70px"}
  &lt;/div&gt;
  ::after
  &lt;/div&gt;
  </code></pre>