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 known scheme is not a link):
114 AssertNotEqual SyntaxOf('n'), 'mkdInlineURL'
119 Execute (autolink without scheme is not a link):
120 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
128 Execute (autolink with space is not a link):
129 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
130 AssertNotEqual SyntaxOf('b'), 'mkdInlineURL'
131 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
132 AssertNotEqual SyntaxOf('d'), 'mkdInlineURL'
133 AssertNotEqual SyntaxOf('e'), 'mkdInlineURL'
138 Execute (autolinks can be backslash escaped):
139 AssertNotEqual SyntaxOf('<'), 'mkdDelimiter'
144 Execute (autolink in parenthesis):
145 AssertNotEqual SyntaxOf('a'), 'mkdInlineURL'
146 AssertEqual SyntaxOf('('), 'mkdDelimiter'
147 AssertEqual SyntaxOf('b'), 'mkdInlineURL'
148 AssertEqual SyntaxOf(')'), 'mkdDelimiter'
149 AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
152 [![a](http://b)](http://c)
154 Execute (autolink in link text):
155 AssertEqual SyntaxOf('!'), 'mkdDelimiter'
156 AssertEqual SyntaxOf('a'), 'mkdLink'
157 AssertEqual SyntaxOf('b'), 'mkdURL'
158 AssertEqual SyntaxOf('c'), 'mkdURL'
167 Execute (code blocks can be fenced with tildes):
168 AssertEqual SyntaxOf('c'), 'mkdCode'
175 Execute (code blocks can be fenced with tildes longer than 3):
176 AssertEqual SyntaxOf('c'), 'mkdCode'
183 Execute (code blocks can be fenced with backticks longer than 3):
184 AssertEqual SyntaxOf('c'), 'mkdCode'
191 Execute (code blocks can have a language specifier):
192 AssertEqual SyntaxOf('c'), 'mkdCode'
201 Execute (code blocks can be fenced with backticks and a language specifier):
202 AssertEqual SyntaxOf('code'), 'mkdCode'
203 AssertNotEqual SyntaxOf('text'), 'mkdCode'
213 Execute (indent code blocks):
214 AssertNotEqual SyntaxOf('a'), 'mkdCode'
215 AssertEqual SyntaxOf('b'), 'mkdCode'
216 AssertEqual SyntaxOf('c'), 'mkdCode'
225 Execute (indent code blocks after header):
226 AssertNotEqual SyntaxOf('a'), 'mkdCode'
227 AssertNotEqual SyntaxOf('b'), 'mkdCode'
228 AssertEqual SyntaxOf('c'), 'mkdCode'
237 Execute (indent code blocks after list):
238 AssertNotEqual SyntaxOf('a'), 'mkdCode'
239 AssertNotEqual SyntaxOf('b'), 'mkdCode'
240 AssertEqual SyntaxOf('c'), 'mkdCode'
253 Execute (fenced code block syntax with a language specifier):
254 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
256 AssertEqual SyntaxOf('include'), 'cInclude'
257 AssertEqual SyntaxOf('code'), 'mkdSnippetCPP'
258 AssertEqual SyntaxOf('def'), 'rubyDefine'
265 Execute (fenced code block syntax with an unknown language specifier):
266 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
268 AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_'
279 AssertNotEqual SyntaxOf('x'), 'mkdMath'
280 AssertNotEqual SyntaxOf('y'), 'mkdMath'
281 let g:vim_markdown_math=1
283 AssertNotEqual SyntaxOf('a'), 'mkdMath'
284 AssertNotEqual SyntaxOf('b'), 'mkdMath'
285 AssertNotEqual SyntaxOf('c'), 'mkdMath'
286 AssertNotEqual SyntaxOf('d'), 'mkdMath'
287 AssertNotEqual SyntaxOf('e'), 'mkdMath'
288 AssertNotEqual SyntaxOf('f'), 'mkdMath'
289 AssertEqual SyntaxOf('x'), 'mkdMath'
290 AssertEqual SyntaxOf('y'), 'mkdMath'
291 let g:vim_markdown_math=0
293 AssertNotEqual SyntaxOf('x'), 'mkdMath'
294 AssertNotEqual SyntaxOf('y'), 'mkdMath'
305 Execute (multiline math):
306 let g:vim_markdown_math=1
308 AssertNotEqual SyntaxOf('a'), 'mkdMath'
309 AssertEqual SyntaxOf('b'), 'mkdMath'
310 AssertNotEqual SyntaxOf('c'), 'mkdMath'
316 Execute (math tex highlighting):
317 let g:vim_markdown_math=0
319 AssertNotEqual SyntaxOf('sqrt'), 'texStatement'
320 AssertNotEqual SyntaxOf('frac'), 'texStatement'
321 let g:vim_markdown_math=1
323 AssertEqual SyntaxOf('sqrt'), 'texStatement'
324 AssertEqual SyntaxOf('frac'), 'texStatement'
333 Execute (YAML frontmatter is controlled by the option):
334 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
335 let g:vim_markdown_frontmatter=1
337 AssertEqual SyntaxOf('a'), 'yamlBlockMappingKey'
338 let g:vim_markdown_frontmatter=0
340 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
348 Execute (YAML frontmatter only works if it's the first thing in the file):
349 let g:vim_markdown_frontmatter=1
351 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
360 Execute (rules are not mistaken by YAML frontmatter delimiters):
361 let g:vim_markdown_frontmatter=1
363 AssertEqual SyntaxAt(5, 1), 'mkdRule'
374 Execute (header title starts with #):
375 AssertEqual SyntaxOf('a'), 'htmlH1'
376 AssertEqual SyntaxOf('b'), 'htmlH2'
391 ## h2 trailing hash ##
397 ### h3 trailing hash ###
405 Execute (atx headers):
406 AssertEqual SyntaxOf('# h1 space'), 'htmlH1'
407 AssertEqual SyntaxOf('#h1 nospace'), 'htmlH1'
408 AssertEqual SyntaxOf('# h1 2 spaces'), 'htmlH1'
409 AssertEqual SyntaxOf('# h1 trailing hash #'), 'htmlH1'
410 AssertEqual SyntaxOf('## h2 space'), 'htmlH2'
411 AssertEqual SyntaxOf('##h2 nospace'), 'htmlH2'
412 AssertEqual SyntaxOf('## h2 trailing hash ##'), 'htmlH2'
413 AssertEqual SyntaxOf('### h3 space'), 'htmlH3'
414 AssertEqual SyntaxOf('###h3 nospace'), 'htmlH3'
415 AssertEqual SyntaxOf('### h3 trailing hash ###'), 'htmlH3'
416 AssertEqual SyntaxOf('#### h4'), 'htmlH4'
417 AssertEqual SyntaxOf('##### h5'), 'htmlH5'
418 AssertEqual SyntaxOf('###### h6'), 'htmlH6'
427 Execute (atx headers relative positions):
428 AssertEqual SyntaxOf('# h1 before h2'), 'htmlH1'
429 AssertEqual SyntaxOf('## h2 between h1s'), 'htmlH2'
430 AssertEqual SyntaxOf('# h1 after h2'), 'htmlH1'
439 setex h1 single punctuation
442 setex h1 punctuation longer than header
443 ================================
445 Execute (setex headers):
446 AssertEqual SyntaxOf('setex h1'), 'htmlH1'
447 AssertEqual SyntaxOf('^========$'), 'htmlH1'
448 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
449 AssertEqual SyntaxOf('--------'), 'htmlH2'
450 AssertEqual SyntaxOf('setex h1 single punctuation'), 'htmlH1'
451 AssertEqual SyntaxOf('^=$'), 'htmlH1'
452 AssertEqual SyntaxOf('setex h1 punctuation longer than header'), 'htmlH1'
453 AssertEqual SyntaxOf('^================================$'), 'htmlH1'
459 Execute (prevent list vs Setex confusion):
460 AssertNotEqual SyntaxOf('- not Setex'), 'htmlH2'
461 AssertNotEqual SyntaxOf('- becuase list'), 'htmlH2'
478 Execute (mixed atx and setex headers):
479 AssertEqual SyntaxOf('setex h1 before atx'), 'htmlH1'
480 AssertEqual SyntaxOf('==================='), 'htmlH1'
481 AssertEqual SyntaxOf('## atx h2'), 'htmlH2'
482 AssertEqual SyntaxOf('### atx h3'), 'htmlH3'
483 AssertEqual SyntaxOf('# atx h1'), 'htmlH1'
484 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
485 AssertEqual SyntaxOf('------------------'), 'htmlH2'
493 Execute (& and > are not marked as htmlError in lists):
494 AssertEqual SyntaxOf('-'), 'mkdListItem'
495 AssertEqual SyntaxOf('1.'), 'mkdListItem'
496 AssertNotEqual SyntaxOf('&'), 'htmlError'
497 AssertNotEqual SyntaxOf('>'), 'htmlError'
508 Execute (HTML tag in text):
509 AssertEqual SyntaxOf('p'), 'htmlTagName'
510 AssertEqual SyntaxOf('<p>'), 'htmlTag'
511 AssertEqual SyntaxOf('</p>'), 'htmlEndTag'
512 AssertEqual SyntaxOf('span'), 'htmlTagName'
513 AssertEqual SyntaxOf('<span>'), 'htmlTag'
514 AssertEqual SyntaxOf('</span>'), 'htmlEndTag'