本文整理汇总了TypeScript中vs/languages/html/common/htmlTokenTypes.getTag函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getTag函数的具体用法?TypeScript getTag怎么用?TypeScript getTag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTag函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: test
test('Embedded Content #6', () => {
modesUtil.assertTokenization(tokenizationSupport, [{
line: '<script>a</script><script>b</script>',
tokens: [
{ startIndex:0, type: DELIM_START, bracket: Modes.Bracket.Open },
{ startIndex:1, type: getTag('script') },
{ startIndex:7, type: DELIM_START, bracket: Modes.Bracket.Close },
{ startIndex:8, type: 'identifier.js' },
{ startIndex:9, type: DELIM_END, bracket: Modes.Bracket.Open },
{ startIndex:11, type: getTag('script') },
{ startIndex:17, type: DELIM_END, bracket: Modes.Bracket.Close },
{ startIndex:18, type: DELIM_START, bracket: Modes.Bracket.Open },
{ startIndex:19, type: getTag('script') },
{ startIndex:25, type: DELIM_START, bracket: Modes.Bracket.Close },
{ startIndex:26, type: 'identifier.js' },
{ startIndex:27, type: DELIM_END, bracket: Modes.Bracket.Open },
{ startIndex:29, type: getTag('script') },
{ startIndex:35, type: DELIM_END, bracket: Modes.Bracket.Close }
]}
]);
});
开发者ID:TESTSSR,项目名称:vscode,代码行数:21,代码来源:html.test.ts
示例2: test
test('Tag with Name-Only-Attribute #1', () => {
modesUtil.assertTokenization(tokenizationSupport, [{
line: '<abc foo>',
tokens: [
{ startIndex:0, type: DELIM_START },
{ startIndex:1, type: getTag('abc') },
{ startIndex:4, type: '' },
{ startIndex:5, type: ATTRIB_NAME },
{ startIndex:8, type: DELIM_START }
]}
]);
});
开发者ID:DiLRandI,项目名称:vscode,代码行数:12,代码来源:html.test.ts
示例3: test
test('Tag with Invalid Attribute Value', () => {
modesUtil.assertTokenization(tokenizationSupport, [{
line: '<abc foo=">',
tokens: [
{ startIndex:0, type: DELIM_START },
{ startIndex:1, type: getTag('abc') },
{ startIndex:4, type: '' },
{ startIndex:5, type: ATTRIB_NAME },
{ startIndex:8, type: DELIM_ASSIGN },
{ startIndex:9, type: ATTRIB_VALUE }
]}
]);
});
开发者ID:LiuYunbao,项目名称:vscode,代码行数:13,代码来源:html.test.ts
示例4: test
test('Tag with Name-Only-Attribute #2', () => {
modesUtil.assertTokenization(tokenizationSupport, [{
line: '<abc foo bar>',
tokens: [
{ startIndex:0, type: DELIM_START, bracket: Modes.Bracket.Open },
{ startIndex:1, type: getTag('abc') },
{ startIndex:4, type: '' },
{ startIndex:5, type: ATTRIB_NAME },
{ startIndex:8, type: '' },
{ startIndex:9, type: ATTRIB_NAME },
{ startIndex:12, type: DELIM_START, bracket: Modes.Bracket.Close }
]}
]);
});
开发者ID:amamut,项目名称:vscode,代码行数:14,代码来源:html.test.ts
示例5: test
test('Tag with Interesting Attribute Name', () => {
modesUtil.assertTokenization(tokenizationSupport, [{
line: '<abc foo!@#="bar">',
tokens: [
{ startIndex:0, type: DELIM_START },
{ startIndex:1, type: getTag('abc') },
{ startIndex:4, type: '' },
{ startIndex:5, type: ATTRIB_NAME },
{ startIndex:11, type: DELIM_ASSIGN },
{ startIndex:12, type: ATTRIB_VALUE },
{ startIndex:17, type: DELIM_START }
]}
]);
});
开发者ID:fedor4ever,项目名称:vscode,代码行数:14,代码来源:html.test.ts
注:本文中的vs/languages/html/common/htmlTokenTypes.getTag函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论