Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-pug-languageservice

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-pug-languageservice - npm Package Compare versions

Comparing version 0.32.0 to 0.32.1

29

out/pugDocument.js

@@ -26,3 +26,3 @@ "use strict";

ast = pugParser(tokens, { filename: fileName, src: pugCode });
visitNode(ast, undefined);
visitNode(ast, undefined, undefined);
// support tag auto-complete in empty lines

@@ -64,6 +64,6 @@ for (const emptyLineEnd of emptyLineEnds) {

};
function visitNode(node, next) {
function visitNode(node, next, parent) {
if (node.type === 'Block') {
for (let i = 0; i < node.nodes.length; i++) {
visitNode(node.nodes[i], node.nodes[i + 1]);
visitNode(node.nodes[i], node.nodes[i + 1], node);
}

@@ -78,4 +78,4 @@ }

if (!selfClosing) {
visitNode(node.block, next);
addEndTag(node, next);
visitNode(node.block, next, parent);
addEndTag(node, next, parent);
}

@@ -133,4 +133,4 @@ const fullHtmlEnd = codeGen.getText().length;

}
function addEndTag(node, next) {
let nextStart = pugCode.length;
function addEndTag(node, next, parent) {
let nextStart;
if (next) {

@@ -144,7 +144,12 @@ if (next.type === 'Block') {

}
fullPugTagEnd = nextStart;
codeGen.addCode('', {
start: nextStart,
end: nextStart,
}, SourceMap.Mode.Totally, undefined);
else if (!parent) {
nextStart = pugCode.length;
}
if (nextStart !== undefined) {
fullPugTagEnd = nextStart;
codeGen.addCode('', {
start: nextStart,
end: nextStart,
}, SourceMap.Mode.Totally, undefined);
}
codeGen.addText(`</${node.name}>`);

@@ -151,0 +156,0 @@ }

{
"name": "vscode-pug-languageservice",
"version": "0.32.0",
"version": "0.32.1",
"main": "out/index.js",

@@ -19,6 +19,6 @@ "license": "MIT",

"dependencies": {
"@volar/code-gen": "0.32.0",
"@volar/shared": "0.32.0",
"@volar/source-map": "0.32.0",
"@volar/transforms": "0.32.0",
"@volar/code-gen": "0.32.1",
"@volar/shared": "0.32.1",
"@volar/source-map": "0.32.1",
"@volar/transforms": "0.32.1",
"pug-lexer": "^5.0.1",

@@ -29,3 +29,3 @@ "pug-parser": "^6.0.0",

},
"gitHead": "a2ef5fbe5813e390a2ab5970905e4cf12a3f829c"
"gitHead": "fb6912ca300ae0a0f4ca0d0aa4c17f691dd930ef"
}
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