]> 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 `&` and `>` are marked as htmlError in lists
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Fri, 8 Jan 2016 06:25:40 +0000 (15:25 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Fri, 8 Jan 2016 06:25:40 +0000 (15:25 +0900)
Fix #214

syntax/markdown.vim
test/syntax.vader

index 72e59e2c1455db59e7a9cbacda67ef7561755969..0e147a3c29b249b182927b571191526ad1b2b23a 100644 (file)
@@ -82,8 +82,7 @@ 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  mkdIndentCode   /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained
-syn match  mkdListItem     "^\s*[-*+]\s\+"
-syn match  mkdListItem     "^\s*\d\+\.\s\+"
+syn region mkdListItemLine matchgroup=mkdListItem start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" contains=@mkdNonListItem,@Spell
 syn region mkdNonListItemBlock start="\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell
 syn match  mkdRule         /^\s*\*\s\{0,1}\*\s\{0,1}\*$/
 syn match  mkdRule         /^\s*-\s\{0,1}-\s\{0,1}-$/
index f3bbf630d0f52a32868138f2d6122900a0a79a5c..9334cab6862987f40164cfdb28fdef48c4ecf235 100644 (file)
@@ -292,3 +292,15 @@ ddd
 Execute (header title starts with #):
   AssertEqual SyntaxOf('a'), 'htmlH1'
   AssertEqual SyntaxOf('b'), 'htmlH2'
+
+# List
+
+Given markdown;
+- a & b
+1. c > d
+
+Execute (& and > are not marked as htmlError in lists):
+  AssertEqual SyntaxOf('-'), 'mkdListItem'
+  AssertEqual SyntaxOf('1.'), 'mkdListItem'
+  AssertNotEqual SyntaxOf('&'), 'htmlError'
+  AssertNotEqual SyntaxOf('>'), 'htmlError'