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.
5 AssertNotEqual SyntaxOf('a'), 'htmlBold'
6 AssertEqual SyntaxOf('b'), 'htmlBold'
7 AssertNotEqual SyntaxOf('c'), 'htmlBold'
13 AssertNotEqual SyntaxOf('a'), 'htmlBold'
14 AssertEqual SyntaxOf('b'), 'htmlBold'
15 AssertNotEqual SyntaxOf('c'), 'htmlBold'
21 AssertNotEqual SyntaxOf('a'), 'htmlItalic'
22 AssertEqual SyntaxOf('b'), 'htmlItalic'
23 AssertNotEqual SyntaxOf('c'), 'htmlItalic'
29 AssertNotEqual SyntaxOf('a'), 'htmlItalic'
30 AssertEqual SyntaxOf('b'), 'htmlItalic'
31 AssertNotEqual SyntaxOf('c'), 'htmlItalic'
36 Execute (not italic with escaped asterisks):
37 AssertNotEqual SyntaxOf('a'), 'htmlItalic'
38 AssertNotEqual SyntaxOf('b'), 'htmlItalic'
39 AssertNotEqual SyntaxOf('c'), 'htmlItalic'
44 Execute (not italic with escaped underscores):
45 AssertNotEqual SyntaxOf('a'), 'htmlItalic'
46 AssertNotEqual SyntaxOf('b'), 'htmlItalic'
47 AssertNotEqual SyntaxOf('c'), 'htmlItalic'
52 Execute (italic with escaped underscores):
53 AssertNotEqual SyntaxOf('a'), 'htmlItalic'
54 AssertEqual SyntaxOf('b'), 'htmlItalic'
55 AssertEqual SyntaxOf('c'), 'htmlItalic'
56 AssertNotEqual SyntaxOf('d'), 'htmlItalic'
61 Execute (bold with escaped underscores):
62 AssertNotEqual SyntaxOf('a'), 'htmlBold'
63 AssertEqual SyntaxOf('b'), 'htmlBold'
64 AssertEqual SyntaxOf('c'), 'htmlBold'
65 AssertNotEqual SyntaxOf('d'), 'htmlBold'
72 Execute (link with title):
73 AssertEqual SyntaxOf('a'), 'mkdLink'
74 AssertEqual SyntaxOf('b'), 'mkdURL'
81 Execute (parenthesis not in link):
82 AssertNotEqual SyntaxOf('a'), 'mkdURL'
83 AssertNotEqual SyntaxOf('b'), 'mkdURL'
88 Execute (multiple links on a line):
89 AssertNotEqual SyntaxOf('c'), 'mkdLink'
90 AssertNotEqual SyntaxOf('c'), 'mkdURL'
98 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
99 AssertEqual SyntaxOf('<'), 'mkdDelimiter'
100 AssertEqual SyntaxOf('b'), 'mkdInlineURL'
101 AssertEqual SyntaxOf('>'), 'mkdDelimiter'
102 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
107 Execute (autolink with scheme case is insensitive):
108 AssertEqual SyntaxOf('a'), 'mkdInlineURL'
113 Execute (autolink without scheme is not a link):
114 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
122 Execute (autolink with space is not a link):
123 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
124 AssertNotEqual SyntaxOf('b'), 'mkdInlineURL'
125 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
126 AssertNotEqual SyntaxOf('d'), 'mkdInlineURL'
127 AssertNotEqual SyntaxOf('e'), 'mkdInlineURL'
132 Execute (autolinks can be backslash escaped):
133 AssertNotEqual SyntaxOf('<'), 'mkdDelimiter'
138 Execute (autolink in parenthesis):
139 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
140 AssertEqual SyntaxOf('('), 'mkdDelimiter'
141 AssertEqual SyntaxOf('b'), 'mkdInlineURL'
142 AssertEqual SyntaxOf(')'), 'mkdDelimiter'
143 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
146 [![a](http://b)](http://c)
148 Execute (autolink in link text):
149 AssertEqual SyntaxOf('!'), 'mkdDelimiter'
150 AssertEqual SyntaxOf('a'), 'mkdLink'
151 AssertEqual SyntaxOf('b'), 'mkdURL'
152 AssertEqual SyntaxOf('c'), 'mkdURL'
161 Execute (code blocks can be fenced with tildes):
162 AssertEqual SyntaxOf('c'), 'mkdCode'
169 Execute (code blocks can be fenced with tildes longer than 3):
170 AssertEqual SyntaxOf('c'), 'mkdCode'
177 Execute (code blocks can be fenced with backticks longer than 3):
178 AssertEqual SyntaxOf('c'), 'mkdCode'
185 Execute (code blocks can have a language specifier):
186 AssertEqual SyntaxOf('c'), 'mkdCode'
195 Execute (code blocks can be fenced with backticks and a language specifier):
196 AssertEqual SyntaxOf('code'), 'mkdCode'
197 AssertNotEqual SyntaxOf('text'), 'mkdCode'
207 Execute (indent code blocks):
208 AssertNotEqual SyntaxOf('a'), 'mkdCode'
209 AssertEqual SyntaxOf('b'), 'mkdCode'
210 AssertEqual SyntaxOf('c'), 'mkdCode'
219 Execute (indent code blocks after header):
220 AssertNotEqual SyntaxOf('a'), 'mkdCode'
221 AssertNotEqual SyntaxOf('b'), 'mkdCode'
222 AssertEqual SyntaxOf('c'), 'mkdCode'
231 Execute (indent code blocks after list):
232 AssertNotEqual SyntaxOf('a'), 'mkdCode'
233 AssertNotEqual SyntaxOf('b'), 'mkdCode'
234 AssertEqual SyntaxOf('c'), 'mkdCode'
247 Execute (fenced code block syntax with a language specifier):
248 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
250 AssertEqual SyntaxOf('include'), 'cInclude'
251 AssertEqual SyntaxOf('code'), 'mkdSnippetCPP'
252 AssertEqual SyntaxOf('def'), 'rubyDefine'
259 Execute (fenced code block syntax with an unknown language specifier):
260 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
262 AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_'
272 Execute (first = or - in fenced code block is not setex headers):
273 AssertEqual SyntaxOf('='), 'mkdCode'
274 AssertEqual SyntaxOf('-'), 'mkdCode'
285 AssertNotEqual SyntaxOf('x'), 'mkdMath'
286 AssertNotEqual SyntaxOf('y'), 'mkdMath'
287 let g:vim_markdown_math=1
289 AssertNotEqual SyntaxOf('a'), 'mkdMath'
290 AssertNotEqual SyntaxOf('b'), 'mkdMath'
291 AssertNotEqual SyntaxOf('c'), 'mkdMath'
292 AssertNotEqual SyntaxOf('d'), 'mkdMath'
293 AssertNotEqual SyntaxOf('e'), 'mkdMath'
294 AssertNotEqual SyntaxOf('f'), 'mkdMath'
295 AssertEqual SyntaxOf('x'), 'mkdMath'
296 AssertEqual SyntaxOf('y'), 'mkdMath'
297 let g:vim_markdown_math=0
299 AssertNotEqual SyntaxOf('x'), 'mkdMath'
300 AssertNotEqual SyntaxOf('y'), 'mkdMath'
311 Execute (multiline math):
312 let g:vim_markdown_math=1
314 AssertNotEqual SyntaxOf('a'), 'mkdMath'
315 AssertEqual SyntaxOf('b'), 'mkdMath'
316 AssertNotEqual SyntaxOf('c'), 'mkdMath'
322 Execute (math tex highlighting):
323 let g:vim_markdown_math=0
325 AssertNotEqual SyntaxOf('sqrt'), 'texStatement'
326 AssertNotEqual SyntaxOf('frac'), 'texStatement'
327 let g:vim_markdown_math=1
329 AssertEqual SyntaxOf('sqrt'), 'texStatement'
330 AssertEqual SyntaxOf('frac'), 'texStatement'
339 Execute (YAML frontmatter is controlled by the option):
340 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
341 let g:vim_markdown_frontmatter=1
343 AssertEqual SyntaxOf('a'), 'yamlBlockMappingKey'
344 let g:vim_markdown_frontmatter=0
346 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
354 Execute (YAML frontmatter only works if it's the first thing in the file):
355 let g:vim_markdown_frontmatter=1
357 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
366 Execute (rules are not mistaken by YAML frontmatter delimiters):
367 let g:vim_markdown_frontmatter=1
369 AssertEqual SyntaxAt(5, 1), 'mkdRule'
380 Execute (header title starts with #):
381 AssertEqual SyntaxOf('a'), 'htmlH1'
382 AssertEqual SyntaxOf('b'), 'htmlH2'
397 ## h2 trailing hash ##
403 ### h3 trailing hash ###
411 Execute (atx headers):
412 AssertEqual SyntaxOf('# h1 space'), 'htmlH1'
413 AssertEqual SyntaxOf('#h1 nospace'), 'htmlH1'
414 AssertEqual SyntaxOf('# h1 2 spaces'), 'htmlH1'
415 AssertEqual SyntaxOf('# h1 trailing hash #'), 'htmlH1'
416 AssertEqual SyntaxOf('## h2 space'), 'htmlH2'
417 AssertEqual SyntaxOf('##h2 nospace'), 'htmlH2'
418 AssertEqual SyntaxOf('## h2 trailing hash ##'), 'htmlH2'
419 AssertEqual SyntaxOf('### h3 space'), 'htmlH3'
420 AssertEqual SyntaxOf('###h3 nospace'), 'htmlH3'
421 AssertEqual SyntaxOf('### h3 trailing hash ###'), 'htmlH3'
422 AssertEqual SyntaxOf('#### h4'), 'htmlH4'
423 AssertEqual SyntaxOf('##### h5'), 'htmlH5'
424 AssertEqual SyntaxOf('###### h6'), 'htmlH6'
433 Execute (atx headers relative positions):
434 AssertEqual SyntaxOf('# h1 before h2'), 'htmlH1'
435 AssertEqual SyntaxOf('## h2 between h1s'), 'htmlH2'
436 AssertEqual SyntaxOf('# h1 after h2'), 'htmlH1'
445 setex h1 single punctuation
448 setex h1 punctuation longer than header
449 ================================
451 Execute (setex headers):
452 AssertEqual SyntaxOf('setex h1'), 'htmlH1'
453 AssertEqual SyntaxOf('^========$'), 'htmlH1'
454 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
455 AssertEqual SyntaxOf('--------'), 'htmlH2'
456 AssertEqual SyntaxOf('setex h1 single punctuation'), 'htmlH1'
457 AssertEqual SyntaxOf('^=$'), 'htmlH1'
458 AssertEqual SyntaxOf('setex h1 punctuation longer than header'), 'htmlH1'
459 AssertEqual SyntaxOf('^================================$'), 'htmlH1'
465 Execute (prevent list vs Setex confusion):
466 AssertNotEqual SyntaxOf('- not Setex'), 'htmlH2'
467 AssertNotEqual SyntaxOf('- becuase list'), 'htmlH2'
484 Execute (mixed atx and setex headers):
485 AssertEqual SyntaxOf('setex h1 before atx'), 'htmlH1'
486 AssertEqual SyntaxOf('==================='), 'htmlH1'
487 AssertEqual SyntaxOf('## atx h2'), 'htmlH2'
488 AssertEqual SyntaxOf('### atx h3'), 'htmlH3'
489 AssertEqual SyntaxOf('# atx h1'), 'htmlH1'
490 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
491 AssertEqual SyntaxOf('------------------'), 'htmlH2'
499 Execute (& and > are not marked as htmlError in lists):
500 AssertEqual SyntaxOf('-'), 'mkdListItem'
501 AssertEqual SyntaxOf('1.'), 'mkdListItem'
502 AssertNotEqual SyntaxOf('&'), 'htmlError'
503 AssertNotEqual SyntaxOf('>'), 'htmlError'
514 Execute (HTML tag in text):
515 AssertEqual SyntaxOf('p'), 'htmlTagName'
516 AssertEqual SyntaxOf('<p>'), 'htmlTag'
517 AssertEqual SyntaxOf('</p>'), 'htmlEndTag'
518 AssertEqual SyntaxOf('span'), 'htmlTagName'
519 AssertEqual SyntaxOf('<span>'), 'htmlTag'
520 AssertEqual SyntaxOf('</span>'), 'htmlEndTag'