prettier-plugin-marko
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -629,3 +629,3 @@ var __defProp = Object.defineProperty; | ||
b5.line, | ||
b5.join(b5.hardlineWithoutBreakParent, path.map(print, "value", "body", "body")) | ||
b5.join(b5.hardline, path.map(print, "value", "body", "body")) | ||
]), | ||
@@ -674,3 +674,17 @@ b5.line, | ||
case "var": { | ||
return tryPrintEmbed(`var ${node.code}=_`, opts.markoScriptParser, (doc6) => doc6[0].contents[1].contents[0]); | ||
return tryPrintEmbed(`var ${node.code}=_`, opts.markoScriptParser, (doc6) => { | ||
const contents = doc6[0].contents[1].contents; | ||
for (let i = contents.length; i--; ) { | ||
const item = contents[i]; | ||
if (typeof item === "string") { | ||
const match = /\s*=\s*$/.exec(item); | ||
if (match) { | ||
contents[i] = item.slice(0, -match[0].length); | ||
contents.length = i + 1; | ||
break; | ||
} | ||
} | ||
} | ||
return contents; | ||
}); | ||
} | ||
@@ -677,0 +691,0 @@ case "params": { |
{ | ||
"name": "prettier-plugin-marko", | ||
"description": "A prettier plugin for parsing and printing Marko files", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"author": "Dylan Piercey <dpiercey@ebay.com>", | ||
@@ -11,3 +11,3 @@ "bugs": "https://github.com/marko-js/prettier/issues", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.2", | ||
"@marko/compiler": "^5.20.5", | ||
"@marko/compiler": "^5.21.4", | ||
"@marko/translator-default": "^5.20.5", | ||
@@ -14,0 +14,0 @@ "@types/mocha": "^9.1.1", |
Sorry, the diff of this file is not supported yet
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
59568
1499