title: How to add comments to fenced code block within doxygen documentation
body: <p>I am using fenced code blocks in Doxygen using the markdown syntax.  This makes it easy to add a simple code example, like this:</p>
  
  <pre><code>~~~~~{.cpp}
  void doSomething()
     {
     }
  ~~~~~
  </code></pre>
  
  <p>When I try to add comments into the fenced code block using two forward slashes, Doxygen seems to remove the slashes.  So when I write this:</p>
  
  <pre><code>~~~~~{.cpp}
  void doSomething()
     {
     // This function should do something
     }
  ~~~~~
  </code></pre>
  
  <p>I get this output:</p>
  
  <pre><code>void doSomething()
     {
  This function should do something
     }
  </code></pre>
  
  <p>How can I tell Doxygen to keep the comments in the fenced code block?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The complete file looks like this (we use the standard Doxygen extension of .dox for documentation-only files):</p>
  
  <pre><code>/*!
  \page PATTERN_SAMPLE Sample
  
  ~~~~~{.cpp}
  void doSomething()
     {
     // This function should do something
     }
  ~~~~~
  */
  </code></pre>
  
  <p>The result looks like this:
  <img src="https://i.stack.imgur.com/3IFie.png" alt="Result"></p>