Skip to content

Commit 6cd682c

Browse files
committed
Code Blocks: Add support for R
1 parent 32cc396 commit 6cd682c

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

Snippets/Code block.tmSnippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>content</key>
6-
<string>\`\`\`${1|ada,adb,ads,antlr,applescript,bash,bib,c,c#,c++,cmake,cpp,csharp,css,dot,fish,g4,go,groovy,grt,gtpl,gv,gvy,haskell,hs,html,inc,java,javascript,jruby,js,json,latex,lua,macruby,make,Makefile,Markdown,matlab,md,node,ocaml,octave,perl,php,pl,prolog,py,python,rake,rb,rbx,ruby,rusthon,scpt,sh,shell,swift,tex,xhtml,yaml,yml,zsh|}
6+
<string>\`\`\`${1|ada,adb,ads,antlr,applescript,bash,bib,c,c#,c++,cmake,cpp,csharp,css,dot,fish,g4,go,groovy,grt,gtpl,gv,gvy,haskell,hs,html,inc,java,javascript,jruby,js,json,latex,lua,macruby,make,Makefile,Markdown,matlab,md,node,ocaml,octave,perl,php,pl,prolog,py,python,r,R,rake,rb,rbx,ruby,rusthon,scpt,sh,shell,swift,tex,xhtml,yaml,yml,zsh|}
77
$0
88
\`\`</string>
99
<key>name</key>

Syntaxes/Markdown (GitHub).tmLanguage

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,44 @@
810810
</dict>
811811
</array>
812812
</dict>
813+
<dict>
814+
<key>begin</key>
815+
<string>(^|\G)\s*([`~]{3,})\s*([Rr])\s*$</string>
816+
<key>beginCaptures</key>
817+
<dict>
818+
<key>2</key>
819+
<dict>
820+
<key>name</key>
821+
<string>punctuation.definition.raw.begin.markdown</string>
822+
</dict>
823+
<key>3</key>
824+
<dict>
825+
<key>name</key>
826+
<string>storage.type.language.markdown</string>
827+
</dict>
828+
</dict>
829+
<key>contentName</key>
830+
<string>source.r</string>
831+
<key>end</key>
832+
<string>(^|\G)\s*(\2)\n?</string>
833+
<key>endCaptures</key>
834+
<dict>
835+
<key>2</key>
836+
<dict>
837+
<key>name</key>
838+
<string>punctuation.definition.raw.end.markdown</string>
839+
</dict>
840+
</dict>
841+
<key>name</key>
842+
<string>markup.raw.block.r</string>
843+
<key>patterns</key>
844+
<array>
845+
<dict>
846+
<key>include</key>
847+
<string>source.r</string>
848+
</dict>
849+
</array>
850+
</dict>
813851
<dict>
814852
<key>begin</key>
815853
<string>(^|\G)\s*([`~]{3,})\s*(ruby|jruby|macruby|rake|rb|rbx)\s*$</string>

0 commit comments

Comments
 (0)