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 (italic with escaped asterisks):
62 AssertNotEqual SyntaxOf('a'), 'htmlItalic'
63 AssertEqual SyntaxOf('b'), 'htmlItalic'
64 AssertEqual SyntaxOf('c'), 'htmlItalic'
65 AssertNotEqual SyntaxOf('d'), 'htmlItalic'
70 Execute (bold with escaped underscores):
71 AssertNotEqual SyntaxOf('a'), 'htmlBold'
72 AssertEqual SyntaxOf('b'), 'htmlBold'
73 AssertEqual SyntaxOf('c'), 'htmlBold'
74 AssertNotEqual SyntaxOf('d'), 'htmlBold'
81 Execute (link with title):
82 AssertEqual SyntaxOf('a'), 'mkdLink'
83 AssertEqual SyntaxOf('b'), 'mkdURL'
90 Execute (parenthesis not in link):
91 AssertNotEqual SyntaxOf('a'), 'mkdURL'
92 AssertNotEqual SyntaxOf('b'), 'mkdURL'
97 Execute (multiple links on a line):
98 AssertNotEqual SyntaxOf('c'), 'mkdLink'
99 AssertNotEqual SyntaxOf('c'), 'mkdURL'
107 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
108 AssertEqual SyntaxOf('<'), 'mkdDelimiter'
109 AssertEqual SyntaxOf('b'), 'mkdInlineURL'
110 AssertEqual SyntaxOf('>'), 'mkdDelimiter'
111 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
116 Execute (autolink with scheme case is insensitive):
117 AssertEqual SyntaxOf('a'), 'mkdInlineURL'
122 Execute (autolink without scheme is not a link):
123 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
131 Execute (autolink with space is not a link):
132 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
133 AssertNotEqual SyntaxOf('b'), 'mkdInlineURL'
134 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
135 AssertNotEqual SyntaxOf('d'), 'mkdInlineURL'
136 AssertNotEqual SyntaxOf('e'), 'mkdInlineURL'
141 Execute (autolinks can be backslash escaped):
142 AssertNotEqual SyntaxOf('<'), 'mkdDelimiter'
147 Execute (autolink in parenthesis):
148 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
149 AssertEqual SyntaxOf('('), 'mkdDelimiter'
150 AssertEqual SyntaxOf('b'), 'mkdInlineURL'
151 AssertEqual SyntaxOf(')'), 'mkdDelimiter'
152 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
155 [![a](http://b)](http://c)
157 Execute (autolink in link text):
158 AssertEqual SyntaxOf('!'), 'mkdDelimiter'
159 AssertEqual SyntaxOf('a'), 'mkdLink'
160 AssertEqual SyntaxOf('b'), 'mkdURL'
161 AssertEqual SyntaxOf('c'), 'mkdURL'
170 Execute (code blocks can be fenced with tildes):
171 AssertEqual SyntaxOf('c'), 'mkdCode'
178 Execute (code blocks can be fenced with tildes longer than 3):
179 AssertEqual SyntaxOf('c'), 'mkdCode'
186 Execute (code blocks can be fenced with backticks longer than 3):
187 AssertEqual SyntaxOf('c'), 'mkdCode'
194 Execute (code blocks can have a language specifier):
195 AssertEqual SyntaxOf('c'), 'mkdCode'
204 Execute (code blocks can be fenced with backticks and a language specifier):
205 AssertEqual SyntaxOf('code'), 'mkdCode'
206 AssertNotEqual SyntaxOf('text'), 'mkdCode'
216 Execute (indent code blocks):
217 AssertNotEqual SyntaxOf('a'), 'mkdCode'
218 AssertEqual SyntaxOf('b'), 'mkdCode'
219 AssertEqual SyntaxOf('c'), 'mkdCode'
228 Execute (indent code blocks after header):
229 AssertNotEqual SyntaxOf('a'), 'mkdCode'
230 AssertNotEqual SyntaxOf('b'), 'mkdCode'
231 AssertEqual SyntaxOf('c'), 'mkdCode'
240 Execute (indent code blocks after list):
241 AssertNotEqual SyntaxOf('a'), 'mkdCode'
242 AssertNotEqual SyntaxOf('b'), 'mkdCode'
243 AssertEqual SyntaxOf('c'), 'mkdCode'
256 Execute (fenced code block syntax with a language specifier):
257 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
259 AssertEqual SyntaxOf('include'), 'cInclude'
260 AssertEqual SyntaxOf('code'), 'mkdSnippetCPP'
261 AssertEqual SyntaxOf('def'), 'rubyDefine'
268 Execute (fenced code block syntax with an unknown language specifier):
269 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
271 AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_'
281 Execute (first = or - in fenced code block is not setex headers):
282 AssertEqual SyntaxOf('='), 'mkdCode'
283 AssertEqual SyntaxOf('-'), 'mkdCode'
294 AssertNotEqual SyntaxOf('x'), 'mkdMath'
295 AssertNotEqual SyntaxOf('y'), 'mkdMath'
296 let g:vim_markdown_math=1
298 AssertNotEqual SyntaxOf('a'), 'mkdMath'
299 AssertNotEqual SyntaxOf('b'), 'mkdMath'
300 AssertNotEqual SyntaxOf('c'), 'mkdMath'
301 AssertNotEqual SyntaxOf('d'), 'mkdMath'
302 AssertNotEqual SyntaxOf('e'), 'mkdMath'
303 AssertNotEqual SyntaxOf('f'), 'mkdMath'
304 AssertEqual SyntaxOf('x'), 'mkdMath'
305 AssertEqual SyntaxOf('y'), 'mkdMath'
306 let g:vim_markdown_math=0
308 AssertNotEqual SyntaxOf('x'), 'mkdMath'
309 AssertNotEqual SyntaxOf('y'), 'mkdMath'
320 Execute (multiline math):
321 let g:vim_markdown_math=1
323 AssertNotEqual SyntaxOf('a'), 'mkdMath'
324 AssertEqual SyntaxOf('b'), 'mkdMath'
325 AssertNotEqual SyntaxOf('c'), 'mkdMath'
331 Execute (math tex highlighting):
332 let g:vim_markdown_math=0
334 AssertNotEqual SyntaxOf('sqrt'), 'texStatement'
335 AssertNotEqual SyntaxOf('frac'), 'texStatement'
336 let g:vim_markdown_math=1
338 AssertEqual SyntaxOf('sqrt'), 'texStatement'
339 AssertEqual SyntaxOf('frac'), 'texStatement'
348 Execute (YAML frontmatter is controlled by the option):
349 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
350 let g:vim_markdown_frontmatter=1
352 AssertEqual SyntaxOf('a'), 'yamlBlockMappingKey'
353 let g:vim_markdown_frontmatter=0
355 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
363 Execute (YAML frontmatter only works if it's the first thing in the file):
364 let g:vim_markdown_frontmatter=1
366 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
375 Execute (rules are not mistaken by YAML frontmatter delimiters):
376 let g:vim_markdown_frontmatter=1
378 AssertEqual SyntaxAt(5, 1), 'mkdRule'
389 Execute (header title starts with #):
390 AssertEqual SyntaxOf('a'), 'htmlH1'
391 AssertEqual SyntaxOf('b'), 'htmlH2'
406 ## h2 trailing hash ##
412 ### h3 trailing hash ###
420 Execute (atx headers):
421 AssertEqual SyntaxOf('# h1 space'), 'htmlH1'
422 AssertEqual SyntaxOf('#h1 nospace'), 'htmlH1'
423 AssertEqual SyntaxOf('# h1 2 spaces'), 'htmlH1'
424 AssertEqual SyntaxOf('# h1 trailing hash #'), 'htmlH1'
425 AssertEqual SyntaxOf('## h2 space'), 'htmlH2'
426 AssertEqual SyntaxOf('##h2 nospace'), 'htmlH2'
427 AssertEqual SyntaxOf('## h2 trailing hash ##'), 'htmlH2'
428 AssertEqual SyntaxOf('### h3 space'), 'htmlH3'
429 AssertEqual SyntaxOf('###h3 nospace'), 'htmlH3'
430 AssertEqual SyntaxOf('### h3 trailing hash ###'), 'htmlH3'
431 AssertEqual SyntaxOf('#### h4'), 'htmlH4'
432 AssertEqual SyntaxOf('##### h5'), 'htmlH5'
433 AssertEqual SyntaxOf('###### h6'), 'htmlH6'
442 Execute (atx headers relative positions):
443 AssertEqual SyntaxOf('# h1 before h2'), 'htmlH1'
444 AssertEqual SyntaxOf('## h2 between h1s'), 'htmlH2'
445 AssertEqual SyntaxOf('# h1 after h2'), 'htmlH1'
454 setex h1 single punctuation
457 setex h1 punctuation longer than header
458 ================================
460 Execute (setex headers):
461 AssertEqual SyntaxOf('setex h1'), 'htmlH1'
462 AssertEqual SyntaxOf('^========$'), 'htmlH1'
463 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
464 AssertEqual SyntaxOf('--------'), 'htmlH2'
465 AssertEqual SyntaxOf('setex h1 single punctuation'), 'htmlH1'
466 AssertEqual SyntaxOf('^=$'), 'htmlH1'
467 AssertEqual SyntaxOf('setex h1 punctuation longer than header'), 'htmlH1'
468 AssertEqual SyntaxOf('^================================$'), 'htmlH1'
474 Execute (prevent list vs Setex confusion):
475 AssertNotEqual SyntaxOf('- not Setex'), 'htmlH2'
476 AssertNotEqual SyntaxOf('- becuase list'), 'htmlH2'
493 Execute (mixed atx and setex headers):
494 AssertEqual SyntaxOf('setex h1 before atx'), 'htmlH1'
495 AssertEqual SyntaxOf('==================='), 'htmlH1'
496 AssertEqual SyntaxOf('## atx h2'), 'htmlH2'
497 AssertEqual SyntaxOf('### atx h3'), 'htmlH3'
498 AssertEqual SyntaxOf('# atx h1'), 'htmlH1'
499 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
500 AssertEqual SyntaxOf('------------------'), 'htmlH2'
508 Execute (& and > are not marked as htmlError in lists):
509 AssertEqual SyntaxOf('-'), 'mkdListItem'
510 AssertEqual SyntaxOf('1.'), 'mkdListItem'
511 AssertNotEqual SyntaxOf('&'), 'htmlError'
512 AssertNotEqual SyntaxOf('>'), 'htmlError'
523 Execute (HTML tag in text):
524 AssertEqual SyntaxOf('p'), 'htmlTagName'
525 AssertEqual SyntaxOf('<p>'), 'htmlTag'
526 AssertEqual SyntaxOf('</p>'), 'htmlEndTag'
527 AssertEqual SyntaxOf('span'), 'htmlTagName'
528 AssertEqual SyntaxOf('<span>'), 'htmlTag'
529 AssertEqual SyntaxOf('</span>'), 'htmlEndTag'