From: Ciro Santilli Date: Fri, 2 Jan 2015 21:26:47 +0000 (+0100) Subject: Merge pull request #158 from nybblr/nybblr/add-tilde-code-blocks X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/091091fdf8f1f7f42bf1a183eab100f923928841?hp=4395b4725650e371066da96ec6ddd0b14e6fdbe0 Merge pull request #158 from nybblr/nybblr/add-tilde-code-blocks Add tilde-fenced code blocks. --- diff --git a/syntax/mkd.vim b/syntax/mkd.vim index 011f95e..60a675d 100644 --- a/syntax/mkd.vim +++ b/syntax/mkd.vim @@ -70,6 +70,8 @@ syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdL syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@]*>" end="" syn region mkdCode start="]*>" end="" syn region mkdFootnote start="\[^" end="\]" diff --git a/test/syntax.vader b/test/syntax.vader index b06ddf0..c3dc02d 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -87,6 +87,24 @@ Given mkd; Execute (autolinks can be backslash escaped): AssertNotEqual SyntaxOf('<'), 'mkdDelimiter' +# Code Blocks + +Given mkd; +~~~ +code +~~~ + +Execute (code blocks can be fenced with tildes): + AssertEqual SyntaxOf('c'), 'mkdCode' + +Given mkd; +~~~ruby +code +~~~ + +Execute (code blocks can have a language specifier): + AssertEqual SyntaxOf('c'), 'mkdCode' + # Math Given mkd;