vscode-html-languageservice
Advanced tools
Comparing version 2.0.0-next.6 to 2.0.0
@@ -23,3 +23,3 @@ (function (factory) { | ||
}; | ||
var tagProviders = tagProviders_1.allTagProviders.filter(function (p) { return p.isApplicable(document.languageId) && (!settings || !!settings[p.getId()]); }); | ||
var tagProviders = tagProviders_1.allTagProviders.filter(function (p) { return p.isApplicable(document.languageId) && (!settings || settings[p.getId()] !== false); }); | ||
var offset = document.offsetAt(position); | ||
@@ -26,0 +26,0 @@ var node = htmlDocument.findNodeBefore(offset); |
@@ -56,3 +56,3 @@ (function (factory) { | ||
var workspaceUrl = getWorkspaceUrl(documentUri, tokenContent, documentContext); | ||
if (!workspaceUrl) { | ||
if (!workspaceUrl || !isValidURI(workspaceUrl)) { | ||
return null; | ||
@@ -65,2 +65,11 @@ } | ||
} | ||
function isValidURI(uri) { | ||
try { | ||
vscode_uri_1.default.parse(uri); | ||
return true; | ||
} | ||
catch (e) { | ||
return false; | ||
} | ||
} | ||
function findDocumentLinks(document, documentContext) { | ||
@@ -67,0 +76,0 @@ var newLinks = []; |
@@ -62,4 +62,4 @@ (function (factory) { | ||
testLinkCreation('https://www.test.com/path/to/file.txt', '//www.microsoft.com/', 'https://www.microsoft.com/'); | ||
// invalid uris don't throw | ||
testLinkCreation('https://www.test.com/path/to/file.txt', '%', 'https://www.test.com/path/to/%'); | ||
// invalid uris are ignored | ||
testLinkCreation('https://www.test.com/path/to/file.txt', '%', null); | ||
// Bug #18314: Ctrl + Click does not open existing file if folder's name starts with 'c' character | ||
@@ -66,0 +66,0 @@ testLinkCreation('file:///c:/Alex/working_dir/18314-link-detection/test.html', '/class/class.js', 'file:///class/class.js'); |
{ | ||
"name": "vscode-html-languageservice", | ||
"version": "2.0.0-next.6", | ||
"version": "2.0.0", | ||
"description": "Language service for HTML", | ||
@@ -23,4 +23,4 @@ "main": "./lib/htmlLanguageService.js", | ||
"dependencies": { | ||
"vscode-languageserver-types": "3.0.2-beta.5", | ||
"vscode-nls": "^2.0.1", | ||
"vscode-languageserver-types": "^3.0.3", | ||
"vscode-nls": "^2.0.2", | ||
"vscode-uri": "^1.0.0" | ||
@@ -27,0 +27,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
301021
5093
1
+ Addedvscode-languageserver-types@3.17.5(transitive)
- Removedvscode-languageserver-types@3.0.2-beta.5(transitive)
Updatedvscode-nls@^2.0.2