Skip to content

Commit

Permalink
Merge pull request #26340 from colemanw/explorerWhitespace
Browse files Browse the repository at this point in the history
APIv4 Explorer - Fix trailing whitespace
  • Loading branch information
colemanw authored May 25, 2023
2 parents 3e63b67 + a67120e commit 30a0cfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ang/api4Explorer/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,8 @@
}
$.each(val, function(k, v) {
var ts = localizable && localizable.includes(k) && _.isString(v) && v.length ? 'E::ts(' : '';
ret += (ret ? ', ' : '') + newLine + indent + "'" + k + "' => " + ts + phpFormat(v, indentChild, indentChildren, localizable) + (ts ? ')' : '');
var leadingComma = !ret ? '' : (newLine ? ',' : ', ');
ret += leadingComma + newLine + indent + "'" + k + "' => " + ts + phpFormat(v, indentChild, indentChildren, localizable) + (ts ? ')' : '');
});
return '[' + ret + trailingComma + newLine + baseLine + ']';
}
Expand All @@ -1034,7 +1035,8 @@
return '[]';
}
$.each(val, function(k, v) {
ret += (ret ? ', ' : '') + newLine + indent + phpFormat(v, indentChild, indentChildren, localizable);
var leadingComma = !ret ? '' : (newLine ? ',' : ', ');
ret += leadingComma + newLine + indent + phpFormat(v, indentChild, indentChildren, localizable);
});
return '[' + ret + trailingComma + newLine + baseLine + ']';
}
Expand Down

0 comments on commit 30a0cfb

Please sign in to comment.