title: KaTeX does not render math between dollars sign on not the same line
body: <p>I want to create an editor with ace + katex. Problem is that double dollars sign does not compiles correctly</p>
  <p>For example:</p>
  <p>Good</p>
  <p><code>$$\mathcal D = 25+4\cdot6\cdot1=49=7^2$$</code></p>
  <p>Bad</p>
  <pre><code>$$
  \mathcal D = 25+4\cdot6\cdot1=49=7^2
  $$
  </code></pre>
  <p>Katex render options:</p>
  <pre><code>renderMathInElement(this.katexView, { delimiters: [
        {left: &quot;$$&quot;, right: &quot;$$&quot;, display: true},
        {left: &quot;$&quot;, right: &quot;$&quot;, display: false},
      ]});
  </code></pre>