vscode-html-languageservice
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -0,1 +1,5 @@ | ||
3.0.3 / 2019-07-25 | ||
================== | ||
* DocumentContext.resolveReference can also return undefined (if the ref is invalid) | ||
3.0.0 / 2019-06-12 | ||
@@ -2,0 +6,0 @@ ================== |
@@ -87,3 +87,3 @@ import { TextDocument, Position, Range } from 'vscode-languageserver-types'; | ||
export interface DocumentContext { | ||
resolveReference(ref: string, base?: string): string; | ||
resolveReference(ref: string, base?: string): string | undefined; | ||
} | ||
@@ -90,0 +90,0 @@ export interface HtmlAttributeValueContext { |
@@ -29,3 +29,3 @@ /*--------------------------------------------------------------------------------------------- | ||
if (/^\s*javascript\:/i.test(tokenContent) || /^\s*\#/i.test(tokenContent) || /[\n\r]/.test(tokenContent)) { | ||
return null; | ||
return undefined; | ||
} | ||
@@ -50,3 +50,3 @@ tokenContent = tokenContent.replace(/^\s*/g, ''); | ||
if (!validateRef(tokenContent, document.languageId)) { | ||
return null; | ||
return undefined; | ||
} | ||
@@ -59,3 +59,3 @@ if (tokenContent.length < attributeValue.length) { | ||
if (!workspaceUrl || !isValidURI(workspaceUrl)) { | ||
return null; | ||
return undefined; | ||
} | ||
@@ -62,0 +62,0 @@ return { |
@@ -87,3 +87,3 @@ import { TextDocument, Position, Range } from 'vscode-languageserver-types'; | ||
export interface DocumentContext { | ||
resolveReference(ref: string, base?: string): string; | ||
resolveReference(ref: string, base?: string): string | undefined; | ||
} | ||
@@ -90,0 +90,0 @@ export interface HtmlAttributeValueContext { |
@@ -40,3 +40,3 @@ /*--------------------------------------------------------------------------------------------- | ||
if (/^\s*javascript\:/i.test(tokenContent) || /^\s*\#/i.test(tokenContent) || /[\n\r]/.test(tokenContent)) { | ||
return null; | ||
return undefined; | ||
} | ||
@@ -61,3 +61,3 @@ tokenContent = tokenContent.replace(/^\s*/g, ''); | ||
if (!validateRef(tokenContent, document.languageId)) { | ||
return null; | ||
return undefined; | ||
} | ||
@@ -70,3 +70,3 @@ if (tokenContent.length < attributeValue.length) { | ||
if (!workspaceUrl || !isValidURI(workspaceUrl)) { | ||
return null; | ||
return undefined; | ||
} | ||
@@ -73,0 +73,0 @@ return { |
{ | ||
"name": "vscode-html-languageservice", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Language service for HTML", | ||
@@ -32,3 +32,3 @@ "main": "./lib/umd/htmlLanguageService.js", | ||
"vscode-nls": "^4.1.1", | ||
"vscode-uri": "^2.0.1" | ||
"vscode-uri": "^2.0.3" | ||
}, | ||
@@ -35,0 +35,0 @@ "scripts": { |
@@ -6,4 +6,6 @@ # vscode-html-languageservice | ||
[![NPM Downloads](https://img.shields.io/npm/dm/vscode-html-languageservice.svg)](https://npmjs.org/package/vscode-html-languageservice) | ||
[![Build Status](https://travis-ci.org/Microsoft/vscode-html-languageservice.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-html-languageservice) | ||
[![Azure DevOps Build Status](https://img.shields.io/azure-devops/build/vscode/4c3636fe-3a50-40b9-b8b4-f820ca92886f/22.svg?label=Azure%20DevOps)](https://dev.azure.com/vscode/vscode-html-languageservice/_build?definitionId=22) | ||
[![Travis Build Status](https://travis-ci.org/Microsoft/vscode-html-languageservice.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-html-languageservice) | ||
Why? | ||
@@ -10,0 +12,0 @@ ---- |
1439828
82
40
Updatedvscode-uri@^2.0.3