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 "$$".