If poly-markdown.el
is loaded. This should work by default. Otherwise M-x poly-markdown+r-mode RET
should do the job.
$$%
$$
1 + 1
## [1] 2
0.4 - 0.7 + 0.3 # what? it is not zero!
## [1] 5.551e-17
(message "it works")
{
}
Some text
Some text
"some text with $ddd$ dfd"
if len(\$declaration) > 0 and \$declaration::isTypedef:
\$Symbols::types.add(\$IDENTIFIER.text)
print "define type "+\$IDENTIFIER.text # line 19