title: Knitr: Only chunk output is html (rest stays rmarkdown)
body: <p>I am trying to make a knitr-based program that reads rmarkdown from a character vector and writes to a textConnection.  I am getting almost what I want but I find that knitr only produces html for chunks and just passes through the rmarkdown to html.  </p>
  
  <p>Here is the code:</p>
  
  <pre><code>text_input &lt;- "Title
  ========================================================
  
  This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages (click the **MD** toolbar button for help on Markdown).
  
  When you click the **Knit HTML** button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
  
  ```{r cache=TRUE}
  x &lt;- cars
  summary(x)
  ```
  
  You can also embed plots, for example:
  
  ```{r fig.width=7, fig.height=6,cache=TRUE}
  plot(x)
  ```
  "
  library(knitr)
  
  outfile &lt;- textConnection("foo.html", "w")
  
  pat_md()
  render_html()
  knit(input=NULL,output=outfile,text=text_input)
  close(outfile)
  cat(foo.html,sep="\n")
  </code></pre>
  
  <p>Which outputs:</p>
  
  <pre><code>Title
  ========================================================
  
  This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages (click the **MD** toolbar button for help on Markdown).
  
  When you click the **Knit HTML** button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
  
  &lt;div class="chunk" id="unnamed-chunk-1"&gt;&lt;div class="rcode"&gt;&lt;div class="source"&gt;&lt;pre class="knitr r"&gt;x &lt;- cars
  summary(x)
  &lt;/pre&gt;&lt;/div&gt;&lt;div class="output"&gt;&lt;pre class="knitr r"&gt;##      speed           dist    
  ##  Min.   : 4.0   Min.   :  2  
  ##  1st Qu.:12.0   1st Qu.: 26  
  ##  Median :15.0   Median : 36  
  ##  Mean   :15.4   Mean   : 43  
  ##  3rd Qu.:19.0   3rd Qu.: 56  
  ##  Max.   :25.0   Max.   :120
  &lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
  
  
  You can also embed plots, for example:
  
  &lt;div class="chunk" id="unnamed-chunk-2"&gt;&lt;div class="rcode"&gt;&lt;div class="source"&gt;&lt;pre class="knitr r"&gt;plot(x)
  &lt;/pre&gt;&lt;/div&gt;&lt;div class="rimage default"&gt;&lt;img src="figure/unnamed-chunk-2.png" title="plot of chunk unnamed-chunk-2" alt="plot of chunk unnamed-chunk-2" class="plot" /&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Is this the expected behavior or am I doing something wrong?</p>