prettier-plugin-stylus
Advanced tools
Comparing version 0.0.1-beta.5 to 0.0.1-beta.6
@@ -36,6 +36,11 @@ "use strict"; | ||
const lines = (0, import_utils.splitLinesWithEols)(text); | ||
for (let i = 0; i < lines.length; i++) { | ||
let start = 0, end = lines.length - 1; | ||
for (; start < end && (0, import_utils.isBlankLine)(lines[start]); start++) | ||
; | ||
for (; end > start && (0, import_utils.isBlankLine)(lines[end]); end--) | ||
; | ||
for (let i = start; i < end; i++) { | ||
if ((0, import_utils.isBlankLine)(lines[i])) { | ||
let indent = ""; | ||
if (i > 0) { | ||
if (i > 0 && !(0, import_utils.isBlankLine)(lines[i - 1])) { | ||
indent = (_b = (_a = lines[i - 1].match(/\s*/)) == null ? void 0 : _a[0]) != null ? _b : ""; | ||
@@ -46,4 +51,3 @@ } | ||
} | ||
text = lines.join(""); | ||
return text; | ||
return lines.slice(start, end + 1).join(""); | ||
} | ||
@@ -65,6 +69,4 @@ function parse(text) { | ||
}; | ||
const result = parser.parse(); | ||
result.text = text; | ||
return result; | ||
return parser.parse(); | ||
} | ||
//# sourceMappingURL=parser.js.map |
{ | ||
"name": "prettier-plugin-stylus", | ||
"version": "0.0.1-beta.5", | ||
"version": "0.0.1-beta.6", | ||
"description": "Prettier plugin for Stylus", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
12163
288