add markdown

This commit is contained in:
Benjamin Pasero 2016-06-20 15:29:26 +02:00
parent dcb32585cc
commit 23b305079f
6 changed files with 269 additions and 0 deletions

View file

@ -33,6 +33,7 @@ requirejs([
'out/test/jade.test',
'out/test/java.test',
'out/test/lua.test',
'out/test/markdown.test',
'out/test/objective-c.test',
'out/test/powershell.test',
'out/test/python.test',

44
test/markdown.test.ts Normal file
View file

@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import {testTokenization} from './testRunner';
testTokenization('markdown', [
[{
line: '# Some header',
tokens: [
{ startIndex: 0, type: 'entity.name.tag.md' }
]
}],
[{
line: '* Some list item',
tokens: [
{ startIndex: 0, type: 'keyword.md' },
{ startIndex: 2, type: '' }
]
}],
[{
line: 'some `code`',
tokens: [
{ startIndex: 0, type: '' },
{ startIndex: 5, type: 'variable.md' }
]
}],
[{
line: 'some ![link](http://link.com)',
tokens: [
{ startIndex: 0, type: '' },
{ startIndex: 5, type: 'string.link.md' },
{ startIndex: 7, type: '' },
{ startIndex: 11, type: 'string.link.md' }
]
}]
]);