From a06dcf8c10395370b14d7503cbfa3d6112145633 Mon Sep 17 00:00:00 2001 From: SeerLite Date: Sun, 11 Oct 2020 00:12:48 -0300 Subject: [PATCH] markdown.kak: Support pandoc's raw_attribute --- rc/filetype/markdown.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/filetype/markdown.kak b/rc/filetype/markdown.kak index c3fdc103..fb504f2a 100644 --- a/rc/filetype/markdown.kak +++ b/rc/filetype/markdown.kak @@ -47,7 +47,7 @@ evaluate-commands %sh{ ruby rust sass scala scss sh swift toml tupfile typescript yaml sql " for lang in ${languages}; do - printf 'add-highlighter shared/markdown/%s region -match-capture ^(\h*)```\h*%s\\b ^(\h*)``` regions\n' "${lang}" "${lang}" + printf 'add-highlighter shared/markdown/%s region -match-capture ^(\h*)```\h*(%s|\\{=%s\\}))\\b ^(\h*)``` regions\n' "${lang}" "${lang}" "${lang}" printf 'add-highlighter shared/markdown/%s/ default-region fill meta\n' "${lang}" [ "${lang}" = kak ] && ref=kakrc || ref="${lang}" printf 'add-highlighter shared/markdown/%s/inner region \A```[^\\n]*\K (?=```) ref %s\n' "${lang}" "${ref}" @@ -100,7 +100,7 @@ define-command -hidden markdown-indent-on-new-line %{ define-command -hidden markdown-load-languages %{ evaluate-commands -draft %{ try %{ - execute-keys 'gtGbGls```\h*\K[^\s]+' + execute-keys 'gtGbGls```\h*\{?=?\K[^}\s]+' evaluate-commands -itersel %{ require-module %val{selection} } }} }