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 have a language specifier):
176 AssertEqual SyntaxOf('c'), 'mkdCode'
185 Execute (code blocks can be fenced with backticks and a language specifier):
186 AssertEqual SyntaxOf('code'), 'mkdCode'
187 AssertNotEqual SyntaxOf('text'), 'mkdCode'
197 Execute (indent code blocks):
198 AssertNotEqual SyntaxOf('a'), 'mkdCode'
199 AssertEqual SyntaxOf('b'), 'mkdCode'
200 AssertEqual SyntaxOf('c'), 'mkdCode'
209 Execute (indent code blocks after header):
210 AssertNotEqual SyntaxOf('a'), 'mkdCode'
211 AssertNotEqual SyntaxOf('b'), 'mkdCode'
212 AssertEqual SyntaxOf('c'), 'mkdCode'
221 Execute (indent code blocks after list):
222 AssertNotEqual SyntaxOf('a'), 'mkdCode'
223 AssertNotEqual SyntaxOf('b'), 'mkdCode'
224 AssertEqual SyntaxOf('c'), 'mkdCode'
237 Execute (fenced code block syntax with a language specifier):
238 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
240 AssertEqual SyntaxOf('include'), 'cInclude'
241 AssertEqual SyntaxOf('code'), 'mkdSnippetCPP'
242 AssertEqual SyntaxOf('def'), 'rubyDefine'
249 Execute (fenced code block syntax with an unknown language specifier):
250 let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax')
252 AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_'
263 AssertNotEqual SyntaxOf('x'), 'mkdMath'
264 AssertNotEqual SyntaxOf('y'), 'mkdMath'
265 let g:vim_markdown_math=1
267 AssertNotEqual SyntaxOf('a'), 'mkdMath'
268 AssertNotEqual SyntaxOf('b'), 'mkdMath'
269 AssertNotEqual SyntaxOf('c'), 'mkdMath'
270 AssertNotEqual SyntaxOf('d'), 'mkdMath'
271 AssertNotEqual SyntaxOf('e'), 'mkdMath'
272 AssertNotEqual SyntaxOf('f'), 'mkdMath'
273 AssertEqual SyntaxOf('x'), 'mkdMath'
274 AssertEqual SyntaxOf('y'), 'mkdMath'
275 let g:vim_markdown_math=0
277 AssertNotEqual SyntaxOf('x'), 'mkdMath'
278 AssertNotEqual SyntaxOf('y'), 'mkdMath'
289 Execute (multiline math):
290 let g:vim_markdown_math=1
292 AssertNotEqual SyntaxOf('a'), 'mkdMath'
293 AssertEqual SyntaxOf('b'), 'mkdMath'
294 AssertNotEqual SyntaxOf('c'), 'mkdMath'
300 Execute (math tex highlighting):
301 let g:vim_markdown_math=0
303 AssertNotEqual SyntaxOf('sqrt'), 'texStatement'
304 AssertNotEqual SyntaxOf('frac'), 'texStatement'
305 let g:vim_markdown_math=1
307 AssertEqual SyntaxOf('sqrt'), 'texStatement'
308 AssertEqual SyntaxOf('frac'), 'texStatement'
317 Execute (YAML frontmatter is controlled by the option):
318 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
319 let g:vim_markdown_frontmatter=1
321 AssertEqual SyntaxOf('a'), 'yamlBlockMappingKey'
322 let g:vim_markdown_frontmatter=0
324 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
332 Execute (YAML frontmatter only works if it's the first thing in the file):
333 let g:vim_markdown_frontmatter=1
335 AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey'
344 Execute (rules are not mistaken by YAML frontmatter delimiters):
345 let g:vim_markdown_frontmatter=1
347 AssertEqual SyntaxAt(5, 1), 'mkdRule'
358 Execute (header title starts with #):
359 AssertEqual SyntaxOf('a'), 'htmlH1'
360 AssertEqual SyntaxOf('b'), 'htmlH2'
375 ## h2 trailing hash ##
381 ### h3 trailing hash ###
389 Execute (atx headers):
390 AssertEqual SyntaxOf('# h1 space'), 'htmlH1'
391 AssertEqual SyntaxOf('#h1 nospace'), 'htmlH1'
392 AssertEqual SyntaxOf('# h1 2 spaces'), 'htmlH1'
393 AssertEqual SyntaxOf('# h1 trailing hash #'), 'htmlH1'
394 AssertEqual SyntaxOf('## h2 space'), 'htmlH2'
395 AssertEqual SyntaxOf('##h2 nospace'), 'htmlH2'
396 AssertEqual SyntaxOf('## h2 trailing hash ##'), 'htmlH2'
397 AssertEqual SyntaxOf('### h3 space'), 'htmlH3'
398 AssertEqual SyntaxOf('###h3 nospace'), 'htmlH3'
399 AssertEqual SyntaxOf('### h3 trailing hash ###'), 'htmlH3'
400 AssertEqual SyntaxOf('#### h4'), 'htmlH4'
401 AssertEqual SyntaxOf('##### h5'), 'htmlH5'
402 AssertEqual SyntaxOf('###### h6'), 'htmlH6'
411 Execute (atx headers relative positions):
412 AssertEqual SyntaxOf('# h1 before h2'), 'htmlH1'
413 AssertEqual SyntaxOf('## h2 between h1s'), 'htmlH2'
414 AssertEqual SyntaxOf('# h1 after h2'), 'htmlH1'
423 setex h1 single punctuation
426 setex h1 punctuation longer than header
427 ================================
429 Execute (setex headers):
430 AssertEqual SyntaxOf('setex h1'), 'htmlH1'
431 AssertEqual SyntaxOf('^========$'), 'htmlH1'
432 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
433 AssertEqual SyntaxOf('--------'), 'htmlH2'
434 AssertEqual SyntaxOf('setex h1 single punctuation'), 'htmlH1'
435 AssertEqual SyntaxOf('^=$'), 'htmlH1'
436 AssertEqual SyntaxOf('setex h1 punctuation longer than header'), 'htmlH1'
437 AssertEqual SyntaxOf('^================================$'), 'htmlH1'
443 Execute (prevent list vs Setex confusion):
444 AssertNotEqual SyntaxOf('- not Setex'), 'htmlH2'
445 AssertNotEqual SyntaxOf('- becuase list'), 'htmlH2'
462 Execute (mixed atx and setex headers):
463 AssertEqual SyntaxOf('setex h1 before atx'), 'htmlH1'
464 AssertEqual SyntaxOf('==================='), 'htmlH1'
465 AssertEqual SyntaxOf('## atx h2'), 'htmlH2'
466 AssertEqual SyntaxOf('### atx h3'), 'htmlH3'
467 AssertEqual SyntaxOf('# atx h1'), 'htmlH1'
468 AssertEqual SyntaxOf('setex h2'), 'htmlH2'
469 AssertEqual SyntaxOf('------------------'), 'htmlH2'
477 Execute (& and > are not marked as htmlError in lists):
478 AssertEqual SyntaxOf('-'), 'mkdListItem'
479 AssertEqual SyntaxOf('1.'), 'mkdListItem'
480 AssertNotEqual SyntaxOf('&'), 'htmlError'
481 AssertNotEqual SyntaxOf('>'), 'htmlError'
492 Execute (HTML tag in text):
493 AssertEqual SyntaxOf('p'), 'htmlTagName'
494 AssertEqual SyntaxOf('<p>'), 'htmlTag'
495 AssertEqual SyntaxOf('</p>'), 'htmlEndTag'
496 AssertEqual SyntaxOf('span'), 'htmlTagName'
497 AssertEqual SyntaxOf('<span>'), 'htmlTag'
498 AssertEqual SyntaxOf('</span>'), 'htmlEndTag'