New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vscode-html-languageservice

Package Overview
Dependencies
Maintainers
7
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-html-languageservice - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

7

lib/esm/services/htmlCompletion.js

@@ -513,3 +513,8 @@ /*---------------------------------------------------------------------------------------------

if (token === TokenType.EndTagOpen && scanner.getTokenEnd() === offset) {
return `${node.tag}>`;
if (document.getText().charAt(offset) !== '>') {
return `${node.tag}>`;
}
else {
return node.tag;
}
}

@@ -516,0 +521,0 @@ token = scanner.scan();

16

lib/esm/services/htmlLinks.js

@@ -63,17 +63,21 @@ /*---------------------------------------------------------------------------------------------

const workspaceUrl = getWorkspaceUrl(document.uri, tokenContent, documentContext, base);
if (!workspaceUrl || !isValidURI(workspaceUrl)) {
if (!workspaceUrl) {
return undefined;
}
const target = validateAndCleanURI(workspaceUrl);
return {
range: Range.create(document.positionAt(startOffset), document.positionAt(endOffset)),
target: workspaceUrl
target
};
}
function isValidURI(uri) {
function validateAndCleanURI(uriStr) {
try {
Uri.parse(uri);
return true;
const uri = Uri.parse(uriStr);
if (uri.query) {
return uri.with({ query: null }).toString(/* skipEncodig*/ true);
}
return uriStr;
}
catch (e) {
return false;
return undefined;
}

@@ -80,0 +84,0 @@ }

@@ -525,3 +525,8 @@ /*---------------------------------------------------------------------------------------------

if (token === htmlLanguageTypes_1.TokenType.EndTagOpen && scanner.getTokenEnd() === offset) {
return `${node.tag}>`;
if (document.getText().charAt(offset) !== '>') {
return `${node.tag}>`;
}
else {
return node.tag;
}
}

@@ -528,0 +533,0 @@ token = scanner.scan();

@@ -75,17 +75,21 @@ /*---------------------------------------------------------------------------------------------

const workspaceUrl = getWorkspaceUrl(document.uri, tokenContent, documentContext, base);
if (!workspaceUrl || !isValidURI(workspaceUrl)) {
if (!workspaceUrl) {
return undefined;
}
const target = validateAndCleanURI(workspaceUrl);
return {
range: htmlLanguageTypes_1.Range.create(document.positionAt(startOffset), document.positionAt(endOffset)),
target: workspaceUrl
target
};
}
function isValidURI(uri) {
function validateAndCleanURI(uriStr) {
try {
vscode_uri_1.URI.parse(uri);
return true;
const uri = vscode_uri_1.URI.parse(uriStr);
if (uri.query) {
return uri.with({ query: null }).toString(/* skipEncodig*/ true);
}
return uriStr;
}
catch (e) {
return false;
return undefined;
}

@@ -92,0 +96,0 @@ }

{
"name": "vscode-html-languageservice",
"version": "5.1.0",
"version": "5.1.1",
"description": "Language service for HTML",

@@ -18,11 +18,11 @@ "main": "./lib/umd/htmlLanguageService.js",

"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/mocha": "^10.0.3",
"@types/node": "16.x",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vscode/web-custom-data": "^0.4.8",
"eslint": "^8.48.0",
"eslint": "^8.52.0",
"js-beautify": "^1.14.9",
"mocha": "^10.2.0",
"rimraf": "^5.0.1",
"rimraf": "^5.0.5",
"typescript": "^5.2.2"

@@ -32,5 +32,5 @@ },

"@vscode/l10n": "^0.0.16",
"vscode-languageserver-textdocument": "^1.0.8",
"vscode-languageserver-types": "^3.17.3",
"vscode-uri": "^3.0.7"
"vscode-languageserver-textdocument": "^1.0.11",
"vscode-languageserver-types": "^3.17.5",
"vscode-uri": "^3.0.8"
},

@@ -37,0 +37,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc