Check if line is end of code chunk in rmd

The last line of a paragraph (to send to R) in rmd files should be defined by a blank line or the end of the code chunk.  There is already a test for rnoweb files.  This adds the equivalent test for rmd files.