Fix issue relating to R Markdown single-line LaTeX $$display equations$$

Fix issue relating to R Markdown single-line LaTeX $$display equations$$

Currently, single-line LaTeX equations like:

$$ x=0 $$

break all of the syntax highlighting below the line in R Markdown files.

This PR should fix the issue by allow both single-line and multiline equations as long as the line with the equation ends with a "$$".

Test
----
Some *Markdown* text **here**.

```{r}
x <- 'test'
print('before LaTeX block.')
```

$$latex$$

no more highlighting from here down...

```{r}
x <- 'including code blocks.'
print('after LaTeX block.')
```