diff --git a/autotests/folding/example.rmd.fold b/autotests/folding/example.rmd.fold
index 154c31c..856c3ea 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/folding/test.markdown.fold b/autotests/folding/test.markdown.fold
index b8b4a9d..5078865 100644
--- a/autotests/folding/test.markdown.fold
+++ b/autotests/folding/test.markdown.fold
@@ -1,39 +1,67 @@
# H1
## H2
### H3
Multi-line paragraph bla bla bla
bla bla bla.
Intentional line break
via two spaces at line.
Formats: _italic_, **bold**, `monospace`, ~~strikeout~~
Bullet list:
* item1
* item2
Numbered list:
1. item 1
2. item 2
[link](http://kde.org)
code 1
code 2
normal text
> block quote _italic_
> more block quote
normal text
Title: some text
normal text
+
+# Fenced code blocks (bug 356974)
+
+## PHP
+
+```php
+namespace Application\Controller;
+
+use Zend\Mvc\Controller\AbstractActionController;
+
+class IndexController extends AbstractActionController
+{
+}
+```
+
+## Python
+
+```python
+def addXToY(x, y):
+ total = x + y
+ print total
+```
+
+## No language specified
+
+```
+No language is specified, but it should be still rendered as code block.
+```
diff --git a/autotests/html/test.markdown.html b/autotests/html/test.markdown.html
index 06b9511..2a6f8d7 100644
--- a/autotests/html/test.markdown.html
+++ b/autotests/html/test.markdown.html
@@ -1,46 +1,74 @@
test.markdown
# H1
## H2
### H3
Multi-line paragraph bla bla bla
bla bla bla.
Intentional line break
via two spaces at line.
Formats: _italic_, **bold**, `monospace`, ~~strikeout~~
Bullet list:
* item1
* item2
Numbered list:
1. item 1
2. item 2
[link](http://kde.org)
code 1
code 2
normal text
> block quote _italic_
> more block quote
normal text
Title: some text
normal text
+
+# Fenced code blocks (bug 356974)
+
+## PHP
+
+```php
+namespace Application\Controller;
+
+use Zend\Mvc\Controller\AbstractActionController;
+
+class IndexController extends AbstractActionController
+{
+}
+```
+
+## Python
+
+```python
+def addXToY(x, y):
+ total = x + y
+ print total
+```
+
+## No language specified
+
+```
+No language is specified, but it should be still rendered as code block.
+```
diff --git a/autotests/input/test.markdown b/autotests/input/test.markdown
index b8b4a9d..74bcb61 100644
--- a/autotests/input/test.markdown
+++ b/autotests/input/test.markdown
@@ -1,39 +1,67 @@
# H1
## H2
### H3
Multi-line paragraph bla bla bla
bla bla bla.
Intentional line break
via two spaces at line.
Formats: _italic_, **bold**, `monospace`, ~~strikeout~~
Bullet list:
* item1
* item2
Numbered list:
1. item 1
2. item 2
[link](http://kde.org)
code 1
code 2
normal text
> block quote _italic_
> more block quote
normal text
Title: some text
normal text
+
+# Fenced code blocks (bug 356974)
+
+## PHP
+
+```php
+namespace Application\Controller;
+
+use Zend\Mvc\Controller\AbstractActionController;
+
+class IndexController extends AbstractActionController
+{
+}
+```
+
+## Python
+
+```python
+def addXToY(x, y):
+ total = x + y
+ print total
+```
+
+## No language specified
+
+```
+No language is specified, but it should be still rendered as code block.
+```
diff --git a/autotests/reference/test.markdown.ref b/autotests/reference/test.markdown.ref
index 52a09d2..70c09c9 100644
--- a/autotests/reference/test.markdown.ref
+++ b/autotests/reference/test.markdown.ref
@@ -1,39 +1,67 @@
# H1
## H2
### H3
Multi-line paragraph bla bla bla
bla bla bla.
Intentional line break
via two spaces at line.
Formats: _italic_, **bold**, `monospace`
, ~~strikeout~~
Bullet list:
* item1
* item2
Numbered list:
1. item 1
2. item 2
[link](http://kde.org)
code 1
code 2
normal text
> block quote
_italic_
> more block quote
normal text
Title: some text
normal text
+
+# Fenced code blocks (bug 356974)
+
+## PHP
+
+```php
+namespace Application\Controller
;
+
+use Zend\Mvc\Controller\AbstractActionController
;
+
+class IndexController
extends AbstractActionController
+{
+}
+```
+
+## Python
+
+```python
+def
addXToY(x, y):
+
total
= x
+ y
+
print
total
+```
+
+## No language specified
+
+```
+No language is specified, but it should be still rendered as code block.
+```
diff --git a/data/syntax/markdown.xml b/data/syntax/markdown.xml
index 7fe2043..39ffaf7 100644
--- a/data/syntax/markdown.xml
+++ b/data/syntax/markdown.xml
@@ -1,134 +1,148 @@
]>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+