mirror of
https://github.com/processing/processing4.git
synced 2026-02-05 14:49:18 +01:00
fix indents for child elements when using -1 (#2119)
This commit is contained in:
@@ -1182,9 +1182,10 @@ public class JSONArray {
|
||||
|
||||
if (length == 1) {
|
||||
JSONObject.writeValue(writer, this.myArrayList.get(0),
|
||||
thisFactor, indent);
|
||||
indentFactor, indent);
|
||||
// thisFactor, indent);
|
||||
} else if (length != 0) {
|
||||
final int newindent = indent + thisFactor;
|
||||
final int newIndent = indent + thisFactor;
|
||||
|
||||
for (int i = 0; i < length; i += 1) {
|
||||
if (commanate) {
|
||||
@@ -1193,9 +1194,11 @@ public class JSONArray {
|
||||
if (indentFactor != -1) {
|
||||
writer.write('\n');
|
||||
}
|
||||
JSONObject.indent(writer, newindent);
|
||||
JSONObject.indent(writer, newIndent);
|
||||
// JSONObject.writeValue(writer, this.myArrayList.get(i),
|
||||
// thisFactor, newIndent);
|
||||
JSONObject.writeValue(writer, this.myArrayList.get(i),
|
||||
thisFactor, newindent);
|
||||
indentFactor, newIndent);
|
||||
commanate = true;
|
||||
}
|
||||
if (indentFactor != -1) {
|
||||
|
||||
Reference in New Issue
Block a user