]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix indent code block at beginning of file
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Wed, 20 Jan 2016 05:53:09 +0000 (14:53 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Wed, 20 Jan 2016 05:53:09 +0000 (14:53 +0900)
Fix #105

syntax/markdown.vim
test/syntax.vader

index 92c6c565fdfd82c0ca56396b07f0332caf2ee33a..79e1a3c735b64b468f6830286fe18342d580cda4 100644 (file)
@@ -96,6 +96,7 @@ syn region mkdCode         start="<pre[^>]*>"              end="</pre>"
 syn region mkdCode         start="<code[^>]*>"             end="</code>"
 syn region mkdFootnote     start="\[^"                     end="\]"
 syn match  mkdCode         /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/
+syn match  mkdCode         /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
 syn match  mkdCode         /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained
 syn region mkdListItemLine matchgroup=mkdListItem start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" contains=@mkdNonListItem,@Spell
 syn region mkdNonListItemBlock start="\(\%^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@!\|\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!\)" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell
index c438dad80b3404bdf6719775a94cfe3f153af94d..b5d1937fd655d431ceee4454a68d7f757467fb66 100644 (file)
@@ -263,6 +263,14 @@ Execute (indent code blocks after list):
   AssertNotEqual SyntaxOf('b'), 'mkdCode'
   AssertEqual SyntaxOf('c'), 'mkdCode'
 
+Given markdown;
+    a
+    b
+
+Execute (indent code block at beginning of file):
+  AssertEqual SyntaxOf('a'), 'mkdCode'
+  AssertEqual SyntaxOf('b'), 'mkdCode'
+
 Given markdown;
 ```c++
 #include <iostream>