Skip to content

Commit 9226072

Browse files
committed
Merge remote-tracking branch 'eraserhd/Rmd-is-markdown'
2 parents 0a0d290 + a75c693 commit 9226072

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rc/filetype/markdown.kak

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Detection
55
# ‾‾‾‾‾‾‾‾‾
66

7-
hook global BufCreate .*[.](markdown|md|mkd) %{
7+
hook global BufCreate .*[.](markdown|md|mkd|Rmd) %{
88
set-option buffer filetype markdown
99
}
1010

@@ -96,7 +96,7 @@ define-command markdown-load-languages -params 1 %{
9696
execute-keys "%arg{1}1s```\h*\{?[.=]?(\w+)\}?<ret>"
9797
evaluate-commands -itersel %{ try %{
9898
require-module %val{selection}
99-
add-highlighter "shared/markdown/codeblock/%val{selection}" region -match-capture "^(\h*)```\h*(%val{selection}\b|\{[.=]?%val{selection}\})" ^(\h*)``` regions
99+
add-highlighter "shared/markdown/codeblock/%val{selection}" region -match-capture "^(\h*)```\h*(%val{selection}\b|\{[.=]?%val{selection}(?:[\h,][^\{\}]*)?\})" ^(\h*)``` regions
100100
add-highlighter "shared/markdown/codeblock/%val{selection}/" default-region fill meta
101101
add-highlighter "shared/markdown/codeblock/%val{selection}/inner" region \A\h*```[^\n]*\K (?=```) ref %val{selection}
102102
add-highlighter "shared/markdown/listblock/codeblock/%val{selection}" region -match-capture "^(\h*)```\h*(%val{selection}\b|\{[.=]?%val{selection}\})" ^(\h*)``` regions

0 commit comments

Comments
 (0)