Merge pull request #461 from dstorey/main-element
Update HTML highlighting & IntelliSense
This commit is contained in:
commit
5b657a5382
|
@ -2,10 +2,9 @@
|
|||
"transition property": {
|
||||
"prefix": "transition",
|
||||
"body": [
|
||||
"transition: ${property} ${duration} ${timing-function} ${delay};",
|
||||
"-webkit-transition: ${property} ${duration} ${timing-function} ${delay};",
|
||||
"-o-transition: ${property} ${duration} ${timing-function} ${delay};",
|
||||
"-moz-transition: ${property} ${duration} ${timing-function} ${delay};"
|
||||
"-moz-transition: ${property} ${duration} ${timing-function} ${delay};",
|
||||
"transition: ${property} ${duration} ${timing-function} ${delay};"
|
||||
],
|
||||
"description": "The transition property across browsers"
|
||||
},
|
||||
|
|
|
@ -708,7 +708,7 @@
|
|||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\b</string>
|
||||
<string>\b(a|abbr|address|area|article|aside|audio|b|base|bdi|bdo|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|main|map|mark|menu|menuitem|meta|meter|nav|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rb|rp|rt|rtc|ruby|s|samp|script|section|select|small|source|span|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|u|ul|var|video|wbr)\b</string>
|
||||
<key>name</key>
|
||||
<string>entity.name.tag.css</string>
|
||||
</dict>
|
||||
|
|
|
@ -206,7 +206,7 @@ export var html5Tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'aud
|
|||
'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer',
|
||||
'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link',
|
||||
'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rb',
|
||||
'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template',
|
||||
'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template',
|
||||
'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr' ];
|
||||
|
||||
export function isColorConstructor(node:nodes.Function): boolean {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import strings = require('vs/base/common/strings');
|
||||
import arrays = require('vs/base/common/arrays');
|
||||
|
||||
var emptyElements:string[] = ['area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var emptyElements:string[] = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
|
||||
export function isEmptyElement(e: string) : boolean {
|
||||
return arrays.binarySearch(emptyElements, e,(s1: string, s2: string) => s1.localeCompare(s2)) >= 0;
|
||||
|
@ -26,6 +26,7 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
head: none,
|
||||
title: none,
|
||||
noscript: none,
|
||||
main: none,
|
||||
section: none,
|
||||
nav: none,
|
||||
article: none,
|
||||
|
@ -44,7 +45,7 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
hr: none,
|
||||
pre: none,
|
||||
blockquote: ['cite'],
|
||||
ol: ['reversed:v', 'start'],
|
||||
ol: ['reversed:v', 'start', 'type:lt'],
|
||||
ul: none,
|
||||
li: ['value'],
|
||||
dl: none,
|
||||
|
@ -53,7 +54,7 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
figure: none,
|
||||
figcaption: none,
|
||||
div: none,
|
||||
a: ['href', 'target', 'ping', 'rel', 'media', 'hreflang', 'type'],
|
||||
a: ['href', 'target', 'download', 'ping', 'rel', 'hreflang', 'type'],
|
||||
em: none,
|
||||
strong: none,
|
||||
small: none,
|
||||
|
@ -63,7 +64,7 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
dfn: none,
|
||||
abbr: none,
|
||||
data: ['value'],
|
||||
time: ['datetime', 'pubdate'],
|
||||
time: ['datetime'],
|
||||
code: none,
|
||||
var: none,
|
||||
samp: none,
|
||||
|
@ -75,8 +76,10 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
u: none,
|
||||
mark: none,
|
||||
ruby: none,
|
||||
rt: none,
|
||||
rb: none,
|
||||
rp: none,
|
||||
rt: none,
|
||||
rtc: none,
|
||||
bdi: none,
|
||||
bdo: none,
|
||||
span: none,
|
||||
|
@ -85,25 +88,26 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
ins: ['cite', 'datetime'],
|
||||
del: ['cite', 'datetime'],
|
||||
img: ['alt', 'src', 'srcset', 'crossorigin:xo', 'usemap', 'ismap:v', 'width', 'height'],
|
||||
iframe: ['src', 'srcdoc', 'name', 'sandbox', 'seamless', 'width', 'height'],
|
||||
iframe: ['src', 'srcdoc', 'name', 'sandbox:sb', 'seamless:v', 'allowfullscreen:v', 'width', 'height'],
|
||||
embed: ['src', 'type', 'width', 'height'],
|
||||
object: ['data', 'type', 'typemustmatch:v', 'name', 'usemap', 'form', 'width', 'height'],
|
||||
param: ['name', 'value'],
|
||||
video: ['src', 'crossorigin:xo', 'poster', 'preload', 'autoplay:v', 'mediagroup', 'loop:v', 'muted:v', 'controls:v', 'width', 'height'],
|
||||
audio: ['src', 'crossorigin:xo', 'preload', 'autoplay:v', 'mediagroup', 'loop:v', 'muted:v', 'controls:v'],
|
||||
source: ['src', 'type', 'media'],
|
||||
track: ['default:v', 'kind', 'label', 'src', 'srclang'],
|
||||
video: ['src', 'crossorigin:xo', 'poster', 'preload:pl', 'autoplay:v', 'mediagroup', 'loop:v', 'muted:v', 'controls:v', 'width', 'height'],
|
||||
audio: ['src', 'crossorigin:xo', 'preload:pl', 'autoplay:v', 'mediagroup', 'loop:v', 'muted:v', 'controls:v'],
|
||||
source: ['src', 'type'],
|
||||
track: ['default:v', 'kind:tk', 'label', 'src', 'srclang'],
|
||||
canvas: ['width', 'height'],
|
||||
map: ['name'],
|
||||
area: ['alt', 'coords', 'shape', 'href', 'target', 'ping', 'rel', 'media', 'hreflang', 'type'],
|
||||
area: ['alt', 'coords', 'shape:sh', 'href', 'target', 'download', 'ping', 'rel', 'hreflang', 'type'],
|
||||
base: ['href', 'target'],
|
||||
link: ['href', 'rel', 'media', 'hreflang', 'type', 'sizes'],
|
||||
link: ['href', 'crossorigin:xo', 'rel', 'media', 'hreflang', 'type', 'sizes'],
|
||||
meta: ['name', 'http-equiv', 'content', 'charset'],
|
||||
style: ['media', 'type', 'scoped:v'],
|
||||
script: ['src', 'async:v', 'defer:v', 'type', 'charset'],
|
||||
body: ['onafterprint', 'onbeforeprint', 'onbeforeunload', 'onblur', 'onerror', 'onfocus', 'onhashchange', 'onload', 'onmessage',
|
||||
'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onresize', 'onscroll', 'onstorage', 'onunload'],
|
||||
table: none,
|
||||
style: ['media', 'nonce', 'type', 'scoped:v'],
|
||||
script: ['src', 'type', 'charset', 'async:v', 'defer:v', 'crossorigin:xo', 'nonce'],
|
||||
template: none,
|
||||
body: ['onafterprint', 'onbeforeprint', 'onbeforeunload', 'onhashchange', 'onlanguagechange', 'onmessage', 'onoffline', 'ononline', 'onpagehide',
|
||||
'onpageshow', 'onpopstate', 'onstorage', 'onunload'],
|
||||
table: ['sortable:v', 'border'],
|
||||
caption: none,
|
||||
colgroup: ['span'],
|
||||
col: ['span'],
|
||||
|
@ -112,28 +116,28 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
tfoot: none,
|
||||
tr: none,
|
||||
td: ['colspan', 'rowspan', 'headers'],
|
||||
th: ['colspan', 'rowspan', 'headers', 'scope', 'abbr'],
|
||||
form: ['accept-charset', 'action', 'autocomplete:o', 'enctype', 'method:m', 'name', 'novalidate:v', 'target'],
|
||||
th: ['colspan', 'rowspan', 'headers', 'scope:s', 'sorted', 'abbr'],
|
||||
form: ['accept-charset', 'action', 'autocomplete:o', 'enctype:et', 'method:m', 'name', 'novalidate:v', 'target'],
|
||||
fieldset: ['disabled:v', 'form', 'name'],
|
||||
legend: none,
|
||||
label: ['form', 'for'],
|
||||
input: ['accept', 'alt', 'autocomplete:o', 'autofocus:v', 'checked:v', 'dirname', 'disabled:v', 'form', 'formaction', 'formenctype',
|
||||
'formmethod:m', 'formnovalidate:v', 'formtarget', 'height', 'inputmode', 'list', 'max', 'maxlength', 'min', 'multiple:v', 'name',
|
||||
'pattern', 'placeholder', 'readonly:v', 'required', 'size', 'src', 'step', 'type:t', 'value', 'width'],
|
||||
button: ['autofocus:v', 'disabled:v', 'form', 'formaction', 'formenctype', 'formmethod:m', 'formnovalidate:v', 'formtarget', 'name', 'type:bt', 'value'],
|
||||
select: ['autofocus:v', 'disabled:v', 'form', 'multiple:v', 'name', 'required:v', 'size'],
|
||||
datalist: ['option'],
|
||||
input: ['accept', 'alt', 'autocomplete:o', 'autofocus:v', 'checked:v', 'dirname', 'disabled:v', 'form', 'formaction', 'formenctype:et',
|
||||
'formmethod:fm', 'formnovalidate:v', 'formtarget', 'height', 'inputmode:im', 'list', 'max', 'maxlength', 'min', 'minlength', 'multiple:v', 'name',
|
||||
'pattern', 'placeholder', 'readonly:v', 'required:v', 'size', 'src', 'step', 'type:t', 'value', 'width'],
|
||||
button: ['autofocus:v', 'disabled:v', 'form', 'formaction', 'formenctype:et', 'formmethod:fm', 'formnovalidate:v', 'formtarget', 'name', 'type:bt', 'value'],
|
||||
select: ['autocomplete:o', 'autofocus:v', 'disabled:v', 'form', 'multiple:v', 'name', 'required:v', 'size'],
|
||||
datalist: none,
|
||||
optgroup: ['disabled:v', 'label'],
|
||||
option: ['disabled:v', 'label', 'selected:v', 'value'],
|
||||
textarea: ['autocomplete:o', 'autofocus:v', 'cols', 'dirname', 'disabled:v', 'form', 'inputmode', 'maxlength', 'name', 'placeholder', 'readonly:v', 'required:v', 'rows', 'wrap'],
|
||||
textarea: ['autocomplete:o', 'autofocus:v', 'cols', 'dirname', 'disabled:v', 'form', 'inputmode:im', 'maxlength', 'minlength', 'name', 'placeholder', 'readonly:v', 'required:v', 'rows', 'wrap:w'],
|
||||
keygen: ['autofocus:v', 'challenge', 'disabled:v', 'form', 'keytype', 'name'],
|
||||
output: ['for', 'form', 'name'],
|
||||
progress: ['value', 'max'],
|
||||
meter: ['value', 'min', 'max', 'low', 'high', 'optimum'],
|
||||
details: ['open:v'],
|
||||
summary: none,
|
||||
command: ['type', 'label', 'icon', 'disabled:v', 'checked:v', 'radiogroup', 'command'],
|
||||
menu: ['type', 'label'],
|
||||
menu: ['type:mt', 'label'],
|
||||
menuitem: ['type:mit', 'label', 'icon', 'disabled:v', 'checked:v', 'radiogroup', 'default:v', 'command'],
|
||||
dialog: ['open:v']
|
||||
};
|
||||
|
||||
|
@ -142,24 +146,36 @@ export function getHTML5TagProvider(): IHTMLTagProvider {
|
|||
'aria-describedby', 'aria-disabled:b', 'aria-dropeffect:dropeffect', 'aria-errormessage', 'aria-expanded:u', 'aria-flowto', 'aria-grabbed:u', 'aria-haspopup:b', 'aria-hidden:b', 'aria-invalid:invalid', 'aria-kbdshortcuts',
|
||||
'aria-label', 'aria-labelledby', 'aria-level', 'aria-live:live', 'aria-modal:b', 'aria-multiline:b', 'aria-multiselectable:b', 'aria-orientation:orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed:tristate',
|
||||
'aria-readonly:b','aria-relevant:relevant', 'aria-required:b', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected:u', 'aria-setsize', 'aria-sort:sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext',
|
||||
'accesskey', 'class', 'contenteditable:b', 'contextmenu', 'dir:d', 'draggable:a', 'dropzone', 'hidden:v', 'id', 'inert:v', 'itemid', 'itemprop', 'itemref', 'itemscope:v', 'itemtype', 'lang', 'role:roles', 'spellcheck:b', 'style', 'tabindex',
|
||||
'title', 'translate'];
|
||||
'accesskey', 'class', 'contenteditable:b', 'contextmenu', 'dir:d', 'draggable:b', 'dropzone', 'hidden:v', 'id', 'itemid', 'itemprop', 'itemref', 'itemscope:v', 'itemtype', 'lang', 'role:roles', 'spellcheck:b', 'style', 'tabindex',
|
||||
'title', 'translate:y'];
|
||||
|
||||
var eventHandlers = ['onabort', 'onblur', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick', 'oncontextmenu', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart',
|
||||
'ondrop', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onfocus', 'onformchange', 'onforminput', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onloadeddata', 'onloadedmetadata',
|
||||
'onloadstart', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreset', 'onreadystatechange', 'onseeked',
|
||||
'onseeking', 'onselect', 'onshow', 'onstalled', 'onsubmit', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting'];
|
||||
'onloadstart', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreset', 'onresize', 'onreadystatechange', 'onscroll',
|
||||
'onseeked', 'onseeking', 'onselect', 'onshow', 'onstalled', 'onsubmit', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting'];
|
||||
|
||||
var valueSets : { [tag:string]: string[]} = {
|
||||
b: ['true', 'false'],
|
||||
a: ['true', 'false', 'auto'],
|
||||
u: ['true', 'false', 'undefined'],
|
||||
d: ['ltr', 'rtl'],
|
||||
m: ['get', 'post'],
|
||||
o: ['on', 'off'],
|
||||
y: ['yes', 'no'],
|
||||
w: ['soft', 'hard'],
|
||||
d: ['ltr', 'rtl', 'auto'],
|
||||
m: ['GET', 'POST', 'dialog'],
|
||||
fm: ['GET', 'POST'],
|
||||
s: ['row', 'col', 'rowgroup', 'colgroup'],
|
||||
t: ['hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'datetime', 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button'],
|
||||
bt: ['button', 'submit', 'reset'],
|
||||
im: ['verbatim', 'latin', 'latin-name', 'latin-prose', 'full-width-latin', 'kana', 'kana-name', 'katakana', 'numeric', 'tel', 'email', 'url'],
|
||||
bt: ['button', 'submit', 'reset', 'menu'],
|
||||
lt: ['1', 'a', 'A', 'i', 'I'],
|
||||
mt: ['context', 'toolbar'],
|
||||
mit: ['command', 'checkbox', 'radio'],
|
||||
et: ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'],
|
||||
tk: ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'],
|
||||
pl: ['none', 'metadata', 'auto'],
|
||||
sh: ['circle', 'default', 'poly', 'rect'],
|
||||
xo: ['anonymous', 'use-credentials'],
|
||||
sb: ['allow-forms', 'allow-modals', 'allow-pointer-lock', 'allow-popups', 'allow-popups-to-escape-sandbox', 'allow-same-origin', 'allow-scripts', 'allow-top-navigation'],
|
||||
tristate: ['true', 'false', 'mixed', 'undefined'],
|
||||
autocomplete: ['inline', 'list', 'both', 'none'],
|
||||
current: ['page', 'step', 'location', 'date', 'time', 'true', 'false'],
|
||||
|
|
Loading…
Reference in a new issue