diff --git a/autotests/folding/example.rmd.fold b/autotests/folding/example.rmd.fold
index c198d13..5df5366 100644
--- a/autotests/folding/example.rmd.fold
+++ b/autotests/folding/example.rmd.fold
@@ -1,39 +1,39 @@
----
-title: "test"
-author: "me"
-date: "07.10.2014"
+---
+title: "test"
+author: "me"
+date: "07.10.2014"
output: html_document
----
+---
This is a simple test document. It shows syntax highlighting switches between YAML (above), R blocks
```{r, echo=FALSE}
-for (i in 1:10) {
+for (i in 1:10) {
if(i>=10) print(i)
-}
+}
# two blank lines below
sessionInfo()
```
LaTeX equations,
-$$
+$$
h_{i}(t \mid q,C) = h_{0}(t) e^{\beta_{1}quality_{i} + \beta_{2}C_{iq}}
-$$
+$$
and Markdown. A [link](http://example.com) in Markdown.
Inline `r y <- 5 + x - sin(3)` R code.
Inline `y <- 5 + x - sin(3)` code.
Heading
=======
Sub-heading
-----------
A list of editors:
* kate
* vim
* emacs
*italic*, **bold**, `monospace`
diff --git a/autotests/reference/example.rmd.ref b/autotests/reference/example.rmd.ref
index 56eedaa..33a486a 100644
--- a/autotests/reference/example.rmd.ref
+++ b/autotests/reference/example.rmd.ref
@@ -1,39 +1,39 @@
----
+---
title: "test"
author: "me"
date: "07.10.2014"
output: html_document
----
+---
This is a simple test document. It shows syntax highlighting switches between YAML (above), R blocks
```{r, echo=FALSE}
for (i in 1:10) {
if(i>=10) print(i)
}
# two blank lines below
sessionInfo()
```
LaTeX equations,
$$
\mid\beta\beta
$$
and Markdown. A [link](http://example.com) in Markdown.
Inline `r y <- 5 + x - sin(3)` R code.
Inline `y <- 5 + x - sin(3)`
code.
Heading
=======
Sub-heading
-----------
A list of editors:
* kate
* vim
* emacs
*italic*, **bold**, `monospace`
diff --git a/data/syntax/rmarkdown.xml b/data/syntax/rmarkdown.xml
index 6d27305..5adb0d4 100644
--- a/data/syntax/rmarkdown.xml
+++ b/data/syntax/rmarkdown.xml
@@ -1,81 +1,83 @@
-
+
+ context="LaTeX equation block" beginRegion="LaTeX equation block"/>
-
+
-
+
-
+
+ context="#pop" endRegion="LaTeX equation block"/>
-
+
-
+