ast-pretty-print
Advanced tools
Comparing version 1.1.1 to 1.1.2
17
index.js
@@ -49,4 +49,6 @@ // @flow | ||
for (let i = 0; i < arr.length; i++) { | ||
res += | ||
'\n' + indentation + '- ' + printValue(arr[i], indentation + ' ', theme); | ||
let val = printValue(arr[i], indentation + ' ', theme); | ||
let space = val[0] === '\n' ? '' : ' '; | ||
res += '\n' + indentation + '-' + space + val; | ||
} | ||
@@ -57,3 +59,5 @@ | ||
let printKeyValue = (key, val, indentation, theme) => { | ||
let printKeyValue = (key, value, indentation, theme) => { | ||
let val = printValue(value, indentation, theme); | ||
let space = val[0] === '\n' ? '' : ' '; | ||
return ( | ||
@@ -65,4 +69,5 @@ '\n' + | ||
theme.key.close + | ||
': ' + | ||
printValue(val, indentation, theme) | ||
':' + | ||
space + | ||
val | ||
); | ||
@@ -114,3 +119,3 @@ }; | ||
let end = printLocation(loc.end); | ||
let splitter = end && start ? ', ' : ''; | ||
let splitter = end && start ? ',' : ''; | ||
return ( | ||
@@ -117,0 +122,0 @@ theme.location.open + |
{ | ||
"name": "ast-pretty-print", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A pretty printer for AST-like structures", | ||
@@ -5,0 +5,0 @@ "main": "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
11042
344