{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/comments/170215031","pull_request_review_id":98866195,"id":170215031,"diff_hunk":"@@ -9,407 +9,435 @@ import { HTMLDocument, Node } from '../parser/htmlParser';\n import { TokenType, createScanner, ScannerState } from '../parser/htmlScanner';\n import { isEmptyElement } from '../parser/htmlTags';\n import { allTagProviders } from './tagProviders';\n-import { CompletionConfiguration } from '../htmlLanguageService';\n+import { CompletionConfiguration, ICompletionParticipant } from '../htmlLanguageService';\n import { entities } from '../parser/htmlEntities';\n \n import * as nls from 'vscode-nls';\n import { isLetterOrDigit, endsWith, startsWith } from '../utils/strings';\n let localize = nls.loadMessageBundle();\n \n-export function doComplete(document: TextDocument, position: Position, htmlDocument: HTMLDocument, settings?: CompletionConfiguration): CompletionList {\n+export class HTMLCompletion {\n+\tcompletionParticipants: ICompletionParticipant[];\n \n-\tlet result: CompletionList = {\n-\t\tisIncomplete: false,\n-\t\titems: []\n-\t};\n-\tlet tagProviders = allTagProviders.filter(p => p.isApplicable(document.languageId) && (!settings || settings[p.getId()] !== false));\n-\n-\tlet text = document.getText();\n-\tlet offset = document.offsetAt(position);\n+\tconstructor() {\n+\t\tthis.completionParticipants = [];\n+\t}\n \n-\tlet node = htmlDocument.findNodeBefore(offset);\n-\tif (!node) {\n-\t\treturn result;\n+\tsetCompletionParticipants(registeredCompletionParticipants: ICompletionParticipant[]) {\n+\t\tthis.completionParticipants = registeredCompletionParticipants || [];\n \t}\n \n-\tlet scanner = createScanner(text, node.start);\n-\tlet currentTag: string = '';\n-\tlet currentAttributeName: string;\n+\tdoComplete(document: TextDocument, position: Position, htmlDocument: HTMLDocument, settings?: CompletionConfiguration): CompletionList {\n+\t\tlet result: CompletionList = {\n+\t\t\tisIncomplete: false,\n+\t\t\titems: []\n+\t\t};\n+\t\tlet completionParticipants = this.completionParticipants;\n+\t\tlet tagProviders = allTagProviders.filter(p => p.isApplicable(document.languageId) && (!settings || settings[p.getId()] !== false));\n \n-\tfunction getReplaceRange(replaceStart: number, replaceEnd: number = offset): Range {\n-\t\tif (replaceStart > offset) {\n-\t\t\treplaceStart = offset;\n+\t\tlet text = document.getText();\n+\t\tlet offset = document.offsetAt(position);\n+\n+\t\tlet node = htmlDocument.findNodeBefore(offset);\n+\t\tif (!node) {\n+\t\t\treturn result;\n \t\t}\n-\t\treturn { start: document.positionAt(replaceStart), end: document.positionAt(replaceEnd) };\n-\t}\n \n-\tfunction collectOpenTagSuggestions(afterOpenBracket: number, tagNameEnd?: number): CompletionList {\n-\t\tlet range = getReplaceRange(afterOpenBracket, tagNameEnd);\n-\t\ttagProviders.forEach((provider) => {\n-\t\t\tprovider.collectTags((tag, label) => {\n-\t\t\t\tresult.items.push({\n-\t\t\t\t\tlabel: tag,\n-\t\t\t\t\tkind: CompletionItemKind.Property,\n-\t\t\t\t\tdocumentation: label,\n-\t\t\t\t\ttextEdit: TextEdit.replace(range, tag),\n-\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n+\t\tlet scanner = createScanner(text, node.start);\n+\t\tlet currentTag: string = '';\n+\t\tlet currentAttributeName: string;\n+\n+\t\tfunction getReplaceRange(replaceStart: number, replaceEnd: number = offset): Range {\n+\t\t\tif (replaceStart > offset) {\n+\t\t\t\treplaceStart = offset;\n+\t\t\t}\n+\t\t\treturn { start: document.positionAt(replaceStart), end: document.positionAt(replaceEnd) };\n+\t\t}\n+\n+\t\tfunction collectOpenTagSuggestions(afterOpenBracket: number, tagNameEnd?: number): CompletionList {\n+\t\t\tlet range = getReplaceRange(afterOpenBracket, tagNameEnd);\n+\t\t\ttagProviders.forEach((provider) => {\n+\t\t\t\tprovider.collectTags((tag, label) => {\n+\t\t\t\t\tresult.items.push({\n+\t\t\t\t\t\tlabel: tag,\n+\t\t\t\t\t\tkind: CompletionItemKind.Property,\n+\t\t\t\t\t\tdocumentation: label,\n+\t\t\t\t\t\ttextEdit: TextEdit.replace(range, tag),\n+\t\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n+\t\t\t\t\t});\n \t\t\t\t});\n \t\t\t});\n-\t\t});\n-\t\treturn result;\n-\t}\n+\t\t\treturn result;\n+\t\t}\n \n-\tfunction getLineIndent(offset: number) {\n-\t\tlet start = offset;\n-\t\twhile (start > 0) {\n-\t\t\tlet ch = text.charAt(start - 1);\n-\t\t\tif (\"\\n\\r\".indexOf(ch) >= 0) {\n-\t\t\t\treturn text.substring(start, offset);\n-\t\t\t}\n-\t\t\tif (!isWhiteSpace(ch)) {\n-\t\t\t\treturn null;\n+\t\tfunction getLineIndent(offset: number) {\n+\t\t\tlet start = offset;\n+\t\t\twhile (start > 0) {\n+\t\t\t\tlet ch = text.charAt(start - 1);\n+\t\t\t\tif (\"\\n\\r\".indexOf(ch) >= 0) {\n+\t\t\t\t\treturn text.substring(start, offset);\n+\t\t\t\t}\n+\t\t\t\tif (!isWhiteSpace(ch)) {\n+\t\t\t\t\treturn null;\n+\t\t\t\t}\n+\t\t\t\tstart--;\n \t\t\t}\n-\t\t\tstart--;\n+\t\t\treturn text.substring(0, offset);\n \t\t}\n-\t\treturn text.substring(0, offset);\n-\t}\n \n-\tfunction collectCloseTagSuggestions(afterOpenBracket: number, inOpenTag: boolean, tagNameEnd: number = offset): CompletionList {\n-\t\tlet range = getReplaceRange(afterOpenBracket, tagNameEnd);\n-\t\tlet closeTag = isFollowedBy(text, tagNameEnd, ScannerState.WithinEndTag, TokenType.EndTagClose) ? '' : '>';\n-\t\tlet curr: Node | undefined = node;\n-\t\tif (inOpenTag) {\n-\t\t\tcurr = curr.parent; // don't suggest the own tag, it's not yet open\n-\t\t}\n-\t\twhile (curr) {\n-\t\t\tlet tag = curr.tag;\n-\t\t\tif (tag && (!curr.closed || curr.endTagStart && (curr.endTagStart > offset))) {\n-\t\t\t\tlet item: CompletionItem = {\n-\t\t\t\t\tlabel: '/' + tag,\n-\t\t\t\t\tkind: CompletionItemKind.Property,\n-\t\t\t\t\tfilterText: '/' + tag + closeTag,\n-\t\t\t\t\ttextEdit: TextEdit.replace(range, '/' + tag + closeTag),\n-\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n-\t\t\t\t};\n-\t\t\t\tlet startIndent = getLineIndent(curr.start);\n-\t\t\t\tlet endIndent = getLineIndent(afterOpenBracket - 1);\n-\t\t\t\tif (startIndent !== null && endIndent !== null && startIndent !== endIndent) {\n-\t\t\t\t\tlet insertText = startIndent + '</' + tag + closeTag;\n-\t\t\t\t\titem.textEdit = TextEdit.replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText);\n-\t\t\t\t\titem.filterText = endIndent + '</' + tag + closeTag;\n+\t\tfunction collectCloseTagSuggestions(afterOpenBracket: number, inOpenTag: boolean, tagNameEnd: number = offset): CompletionList {\n+\t\t\tlet range = getReplaceRange(afterOpenBracket, tagNameEnd);\n+\t\t\tlet closeTag = isFollowedBy(text, tagNameEnd, ScannerState.WithinEndTag, TokenType.EndTagClose) ? '' : '>';\n+\t\t\tlet curr: Node | undefined = node;\n+\t\t\tif (inOpenTag) {\n+\t\t\t\tcurr = curr.parent; // don't suggest the own tag, it's not yet open\n+\t\t\t}\n+\t\t\twhile (curr) {\n+\t\t\t\tlet tag = curr.tag;\n+\t\t\t\tif (tag && (!curr.closed || curr.endTagStart && (curr.endTagStart > offset))) {\n+\t\t\t\t\tlet item: CompletionItem = {\n+\t\t\t\t\t\tlabel: '/' + tag,\n+\t\t\t\t\t\tkind: CompletionItemKind.Property,\n+\t\t\t\t\t\tfilterText: '/' + tag + closeTag,\n+\t\t\t\t\t\ttextEdit: TextEdit.replace(range, '/' + tag + closeTag),\n+\t\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n+\t\t\t\t\t};\n+\t\t\t\t\tlet startIndent = getLineIndent(curr.start);\n+\t\t\t\t\tlet endIndent = getLineIndent(afterOpenBracket - 1);\n+\t\t\t\t\tif (startIndent !== null && endIndent !== null && startIndent !== endIndent) {\n+\t\t\t\t\t\tlet insertText = startIndent + '</' + tag + closeTag;\n+\t\t\t\t\t\titem.textEdit = TextEdit.replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText);\n+\t\t\t\t\t\titem.filterText = endIndent + '</' + tag + closeTag;\n+\t\t\t\t\t}\n+\t\t\t\t\tresult.items.push(item);\n+\t\t\t\t\treturn result;\n \t\t\t\t}\n-\t\t\t\tresult.items.push(item);\n+\t\t\t\tcurr = curr.parent;\n+\t\t\t}\n+\t\t\tif (inOpenTag) {\n \t\t\t\treturn result;\n \t\t\t}\n-\t\t\tcurr = curr.parent;\n-\t\t}\n-\t\tif (inOpenTag) {\n+\n+\t\t\ttagProviders.forEach(provider => {\n+\t\t\t\tprovider.collectTags((tag, label) => {\n+\t\t\t\t\tresult.items.push({\n+\t\t\t\t\t\tlabel: '/' + tag,\n+\t\t\t\t\t\tkind: CompletionItemKind.Property,\n+\t\t\t\t\t\tdocumentation: label,\n+\t\t\t\t\t\tfilterText: '/' + tag + closeTag,\n+\t\t\t\t\t\ttextEdit: TextEdit.replace(range, '/' + tag + closeTag),\n+\t\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n+\t\t\t\t\t});\n+\t\t\t\t});\n+\t\t\t});\n \t\t\treturn result;\n \t\t}\n \n-\t\ttagProviders.forEach(provider => {\n-\t\t\tprovider.collectTags((tag, label) => {\n+\t\tfunction collectAutoCloseTagSuggestion(tagCloseEnd: number, tag: string): CompletionList {\n+\t\t\tif (settings && settings.hideAutoCompleteProposals) {\n+\t\t\t\treturn result;\n+\t\t\t}\n+\t\t\tif (!isEmptyElement(tag)) {\n+\t\t\t\tlet pos = document.positionAt(tagCloseEnd);\n \t\t\t\tresult.items.push({\n-\t\t\t\t\tlabel: '/' + tag,\n+\t\t\t\t\tlabel: '</' + tag + '>',\n \t\t\t\t\tkind: CompletionItemKind.Property,\n-\t\t\t\t\tdocumentation: label,\n-\t\t\t\t\tfilterText: '/' + tag + closeTag,\n-\t\t\t\t\ttextEdit: TextEdit.replace(range, '/' + tag + closeTag),\n-\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n+\t\t\t\t\tfilterText: '</' + tag + '>',\n+\t\t\t\t\ttextEdit: TextEdit.insert(pos, '$0</' + tag + '>'),\n+\t\t\t\t\tinsertTextFormat: InsertTextFormat.Snippet\n \t\t\t\t});\n-\t\t\t});\n-\t\t});\n-\t\treturn result;\n-\t}\n-\n-\tfunction collectAutoCloseTagSuggestion(tagCloseEnd: number, tag: string): CompletionList {\n-\t\tif (settings && settings.hideAutoCompleteProposals) {\n+\t\t\t}\n \t\t\treturn result;\n \t\t}\n-\t\tif (!isEmptyElement(tag)) {\n-\t\t\tlet pos = document.positionAt(tagCloseEnd);\n-\t\t\tresult.items.push({\n-\t\t\t\tlabel: '</' + tag + '>',\n-\t\t\t\tkind: CompletionItemKind.Property,\n-\t\t\t\tfilterText: '</' + tag + '>',\n-\t\t\t\ttextEdit: TextEdit.insert(pos, '$0</' + tag + '>'),\n-\t\t\t\tinsertTextFormat: InsertTextFormat.Snippet\n-\t\t\t});\n-\t\t}\n-\t\treturn result;\n-\t}\n \n-\tfunction collectTagSuggestions(tagStart: number, tagEnd: number): CompletionList {\n-\t\tcollectOpenTagSuggestions(tagStart, tagEnd);\n-\t\tcollectCloseTagSuggestions(tagStart, true, tagEnd);\n-\t\treturn result;\n-\t}\n-\n-\tfunction collectAttributeNameSuggestions(nameStart: number, nameEnd: number = offset): CompletionList {\n-\t\tlet replaceEnd = offset;\n-\t\twhile (replaceEnd < nameEnd && text[replaceEnd] !== '<') { // < is a valid attribute name character, but we rather assume the attribute name ends. See #23236.\n-\t\t\treplaceEnd++;\n+\t\tfunction collectTagSuggestions(tagStart: number, tagEnd: number): CompletionList {\n+\t\t\tcollectOpenTagSuggestions(tagStart, tagEnd);\n+\t\t\tcollectCloseTagSuggestions(tagStart, true, tagEnd);\n+\t\t\treturn result;\n \t\t}\n-\t\tlet range = getReplaceRange(nameStart, replaceEnd);\n-\t\tlet value = isFollowedBy(text, nameEnd, ScannerState.AfterAttributeName, TokenType.DelimiterAssign) ? '' : '=\"$1\"';\n-\t\tlet tag = currentTag.toLowerCase();\n-\t\ttagProviders.forEach(provider => {\n-\t\t\tprovider.collectAttributes(tag, (attribute, type?: string) => {\n-\t\t\t\tlet codeSnippet = attribute;\n-\t\t\t\tlet command;\n-\t\t\t\tif (type !== 'v' && value.length) {\n-\t\t\t\t\tcodeSnippet = codeSnippet + value;\n-\t\t\t\t\tif (type) {\n-\t\t\t\t\t\tcommand = {\n-\t\t\t\t\t\t\ttitle: 'Suggest',\n-\t\t\t\t\t\t\tcommand: 'editor.action.triggerSuggest'\n-\t\t\t\t\t\t};\n+\n+\t\tfunction collectAttributeNameSuggestions(nameStart: number, nameEnd: number = offset): CompletionList {\n+\t\t\tlet replaceEnd = offset;\n+\t\t\twhile (replaceEnd < nameEnd && text[replaceEnd] !== '<') { // < is a valid attribute name character, but we rather assume the attribute name ends. See #23236.\n+\t\t\t\treplaceEnd++;\n+\t\t\t}\n+\t\t\tlet range = getReplaceRange(nameStart, replaceEnd);\n+\t\t\tlet value = isFollowedBy(text, nameEnd, ScannerState.AfterAttributeName, TokenType.DelimiterAssign) ? '' : '=\"$1\"';\n+\t\t\tlet tag = currentTag.toLowerCase();\n+\t\t\ttagProviders.forEach(provider => {\n+\t\t\t\tprovider.collectAttributes(tag, (attribute, type?: string) => {\n+\t\t\t\t\tlet codeSnippet = attribute;\n+\t\t\t\t\tlet command;\n+\t\t\t\t\tif (type !== 'v' && value.length) {\n+\t\t\t\t\t\tcodeSnippet = codeSnippet + value;\n+\t\t\t\t\t\tif (type) {\n+\t\t\t\t\t\t\tcommand = {\n+\t\t\t\t\t\t\t\ttitle: 'Suggest',\n+\t\t\t\t\t\t\t\tcommand: 'editor.action.triggerSuggest'\n+\t\t\t\t\t\t\t};\n+\t\t\t\t\t\t}\n \t\t\t\t\t}\n-\t\t\t\t}\n-\t\t\t\tresult.items.push({\n-\t\t\t\t\tlabel: attribute,\n-\t\t\t\t\tkind: type === 'handler' ? CompletionItemKind.Function : CompletionItemKind.Value,\n-\t\t\t\t\ttextEdit: TextEdit.replace(range, codeSnippet),\n-\t\t\t\t\tinsertTextFormat: InsertTextFormat.Snippet,\n-\t\t\t\t\tcommand\n+\t\t\t\t\tresult.items.push({\n+\t\t\t\t\t\tlabel: attribute,\n+\t\t\t\t\t\tkind: type === 'handler' ? CompletionItemKind.Function : CompletionItemKind.Value,\n+\t\t\t\t\t\ttextEdit: TextEdit.replace(range, codeSnippet),\n+\t\t\t\t\t\tinsertTextFormat: InsertTextFormat.Snippet,\n+\t\t\t\t\t\tcommand\n+\t\t\t\t\t});\n \t\t\t\t});\n \t\t\t});\n-\t\t});\n-\t\tcollectDataAttributesSuggestions(range);\n-\t\treturn result;\n-\t}\n+\t\t\tcollectDataAttributesSuggestions(range);\n+\t\t\treturn result;\n+\t\t}\n \n-\tfunction collectDataAttributesSuggestions(range: Range) {\n+\t\tfunction collectDataAttributesSuggestions(range: Range) {\n \n-\t\tconst dataAttr = 'data-';\n-\t\tlet dataAttributes: { [name: string]: string } = {};\n+\t\t\tconst dataAttr = 'data-';\n+\t\t\tlet dataAttributes: { [name: string]: string } = {};\n \n-\t\tdataAttributes[dataAttr] = `${dataAttr}$1=\"$2\"`;\n+\t\t\tdataAttributes[dataAttr] = `${dataAttr}$1=\"$2\"`;\n \n-\t\tfunction addNodeDataAttributes(node: Node) {\n-\t\t\tnode.attributeNames.forEach(attr => {\n-\t\t\t\tif (startsWith(attr, dataAttr) && !dataAttributes[attr]) {\n-\t\t\t\t\tdataAttributes[attr] = attr + '=\"$1\"';\n-\t\t\t\t}\n-\t\t\t});\n-\t\t\tnode.children.forEach(child => addNodeDataAttributes(child));\n-\t\t}\n+\t\t\tfunction addNodeDataAttributes(node: Node) {\n+\t\t\t\tnode.attributeNames.forEach(attr => {\n+\t\t\t\t\tif (startsWith(attr, dataAttr) && !dataAttributes[attr]) {\n+\t\t\t\t\t\tdataAttributes[attr] = attr + '=\"$1\"';\n+\t\t\t\t\t}\n+\t\t\t\t});\n+\t\t\t\tnode.children.forEach(child => addNodeDataAttributes(child));\n+\t\t\t}\n \n-\t\tif (htmlDocument) {\n-\t\t\thtmlDocument.roots.forEach(root => addNodeDataAttributes(root));\n+\t\t\tif (htmlDocument) {\n+\t\t\t\thtmlDocument.roots.forEach(root => addNodeDataAttributes(root));\n+\t\t\t}\n+\t\t\tObject.keys(dataAttributes).forEach(attr => result.items.push({\n+\t\t\t\tlabel: attr,\n+\t\t\t\tkind: CompletionItemKind.Value,\n+\t\t\t\ttextEdit: TextEdit.replace(range, dataAttributes[attr]),\n+\t\t\t\tinsertTextFormat: InsertTextFormat.Snippet\n+\t\t\t}));\n \t\t}\n-\t\tObject.keys(dataAttributes).forEach(attr => result.items.push({\n-\t\t\tlabel: attr,\n-\t\t\tkind: CompletionItemKind.Value,\n-\t\t\ttextEdit: TextEdit.replace(range, dataAttributes[attr]),\n-\t\t\tinsertTextFormat: InsertTextFormat.Snippet\n-\t\t}));\n-\t}\n \n-\tfunction collectAttributeValueSuggestions(valueStart: number, valueEnd: number = offset): CompletionList {\n-\t\tlet range: Range;\n-\t\tlet addQuotes: boolean;\n-\t\tif (offset > valueStart && offset <= valueEnd && text[valueStart] === '\"') {\n-\t\t\t// inside attribute\n-\t\t\tif (valueEnd > offset && text[valueEnd - 1] === '\"') {\n-\t\t\t\tvalueEnd--;\n+\t\tfunction collectAttributeValueSuggestions(valueStart: number, valueEnd: number = offset): CompletionList {\n+\t\t\tlet range: Range;\n+\t\t\tlet addQuotes: boolean;\n+\t\t\tif (offset > valueStart && offset <= valueEnd && text[valueStart] === '\"') {\n+\t\t\t\t// inside attribute\n+\t\t\t\tif (valueEnd > offset && text[valueEnd - 1] === '\"') {\n+\t\t\t\t\tvalueEnd--;\n+\t\t\t\t}\n+\t\t\t\tlet wsBefore = getWordStart(text, offset, valueStart + 1);\n+\t\t\t\tlet wsAfter = getWordEnd(text, offset, valueEnd);\n+\t\t\t\trange = getReplaceRange(wsBefore, wsAfter);\n+\t\t\t\taddQuotes = false;\n+\t\t\t} else {\n+\t\t\t\trange = getReplaceRange(valueStart, valueEnd);\n+\t\t\t\taddQuotes = true;\n \t\t\t}\n-\t\t\tlet wsBefore = getWordStart(text, offset, valueStart + 1);\n-\t\t\tlet wsAfter = getWordEnd(text, offset, valueEnd);\n-\t\t\trange = getReplaceRange(wsBefore, wsAfter);\n-\t\t\taddQuotes = false;\n-\t\t} else {\n-\t\t\trange = getReplaceRange(valueStart, valueEnd);\n-\t\t\taddQuotes = true;\n-\t\t}\n-\t\tlet tag = currentTag.toLowerCase();\n-\t\tlet attribute = currentAttributeName.toLowerCase();\n-\t\ttagProviders.forEach(provider => {\n-\t\t\tprovider.collectValues(tag, attribute, value => {\n-\t\t\t\tlet insertText = addQuotes ? '\"' + value + '\"' : value;\n-\t\t\t\tresult.items.push({\n-\t\t\t\t\tlabel: value,\n-\t\t\t\t\tfilterText: insertText,\n-\t\t\t\t\tkind: CompletionItemKind.Unit,\n-\t\t\t\t\ttextEdit: TextEdit.replace(range, insertText),\n-\t\t\t\t\tinsertTextFormat: InsertTextFormat.PlainText\n+\n+\t\t\tlet tag = currentTag.toLowerCase();\n+\t\t\tlet attribute = currentAttributeName.toLowerCase();\n+\t\t\tlet value = extractAttributeValue(scanner.getTokenText());\n+\n+\t\t\tcompletionParticipants.forEach(participant => {","path":"src/services/htmlCompletion.ts","position":414,"original_position":414,"commit_id":"34ef8544c37b1d2b12426b01433571e7d6cf061f","original_commit_id":"34ef8544c37b1d2b12426b01433571e7d6cf061f","user":{"login":"aeschli","id":6461412,"avatar_url":"https://avatars0.githubusercontent.com/u/6461412?v=4","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false},"body":"Use `for (let participant of completionParticipants)`","created_at":"2018-02-23T10:22:01Z","updated_at":"2018-02-23T10:24:31Z","html_url":"https://github.com/Microsoft/vscode-html-languageservice/pull/23#discussion_r170215031","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/comments/170215031"},"html":{"href":"https://github.com/Microsoft/vscode-html-languageservice/pull/23#discussion_r170215031"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23","id":170976453,"html_url":"https://github.com/Microsoft/vscode-html-languageservice/pull/23","diff_url":"https://github.com/Microsoft/vscode-html-languageservice/pull/23.diff","patch_url":"https://github.com/Microsoft/vscode-html-languageservice/pull/23.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/23","number":23,"state":"open","locked":false,"title":"Octref/completion participant","user":{"login":"octref","id":4033249,"avatar_url":"https://avatars1.githubusercontent.com/u/4033249?v=4","gravatar_id":"","url":"https://api.github.com/users/octref","html_url":"https://github.com/octref","followers_url":"https://api.github.com/users/octref/followers","following_url":"https://api.github.com/users/octref/following{/other_user}","gists_url":"https://api.github.com/users/octref/gists{/gist_id}","starred_url":"https://api.github.com/users/octref/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octref/subscriptions","organizations_url":"https://api.github.com/users/octref/orgs","repos_url":"https://api.github.com/users/octref/repos","events_url":"https://api.github.com/users/octref/events{/privacy}","received_events_url":"https://api.github.com/users/octref/received_events","type":"User","site_admin":false},"body":"To go together with https://github.com/Microsoft/vscode/pull/44144","created_at":"2018-02-23T10:09:27Z","updated_at":"2018-02-23T10:24:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b9e21ce2553e41bc619571f9b15ac904016197a","assignee":{"login":"aeschli","id":6461412,"avatar_url":"https://avatars0.githubusercontent.com/u/6461412?v=4","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false},"assignees":[{"login":"aeschli","id":6461412,"avatar_url":"https://avatars0.githubusercontent.com/u/6461412?v=4","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/23/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/statuses/34ef8544c37b1d2b12426b01433571e7d6cf061f","head":{"label":"Microsoft:octref/completion-participant","ref":"octref/completion-participant","sha":"34ef8544c37b1d2b12426b01433571e7d6cf061f","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":68237072,"name":"vscode-html-languageservice","full_name":"Microsoft/vscode-html-languageservice","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vscode-html-languageservice","description":"Language services for HTML","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice","forks_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/deployments","created_at":"2016-09-14T19:36:46Z","updated_at":"2018-02-23T09:48:02Z","pushed_at":"2018-02-23T10:09:28Z","git_url":"git://github.com/Microsoft/vscode-html-languageservice.git","ssh_url":"git@github.com:Microsoft/vscode-html-languageservice.git","clone_url":"https://github.com/Microsoft/vscode-html-languageservice.git","svn_url":"https://github.com/Microsoft/vscode-html-languageservice","homepage":null,"size":235,"stargazers_count":23,"watchers_count":23,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":19,"open_issues":8,"watchers":23,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"80d88ba120400691396b5112e263650f6ed59fad","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":68237072,"name":"vscode-html-languageservice","full_name":"Microsoft/vscode-html-languageservice","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vscode-html-languageservice","description":"Language services for HTML","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice","forks_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/deployments","created_at":"2016-09-14T19:36:46Z","updated_at":"2018-02-23T09:48:02Z","pushed_at":"2018-02-23T10:09:28Z","git_url":"git://github.com/Microsoft/vscode-html-languageservice.git","ssh_url":"git@github.com:Microsoft/vscode-html-languageservice.git","clone_url":"https://github.com/Microsoft/vscode-html-languageservice.git","svn_url":"https://github.com/Microsoft/vscode-html-languageservice","homepage":null,"size":235,"stargazers_count":23,"watchers_count":23,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":19,"open_issues":8,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23"},"html":{"href":"https://github.com/Microsoft/vscode-html-languageservice/pull/23"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/23"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-html-languageservice/statuses/34ef8544c37b1d2b12426b01433571e7d6cf061f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"aeschli"}}