mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-12 03:27:07 +00:00
Object description formatting
- Made CPDescriptionOfObject smarter about detecting CG objects - CPObject, CPArray, CPDictionary do a better (as in perfect) job of indenting nested objects - CPDictionary is displayed using Cocoa-style key = value; notation
This commit is contained in:
1 parent
2d34d458f4
commit
95790d55d5
6 files changed
+60
-59
No files matched your search
@@ -874,18 +874,20 @@ var concat = Array.prototype.concat,
|
||||
{
|
||||
var index = 0,
|
||||
count = [self count],
|
||||
description = "@[";
|
||||
description = "[";
|
||||
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
if (index === 0)
|
||||
description += "\n\t";
|
||||
description += "\n";
|
||||
|
||||
var object = [self objectAtIndex:index];
|
||||
description += CPDescriptionOfObject(object);
|
||||
|
||||
if (index !== count - 1)
|
||||
description += ",\n\t";
|
||||
// NOTE: replace(/^/mg, " ") inserts 4 spaces at the beginning of every line
|
||||
description += CPDescriptionOfObject(object).replace(/^/mg, " ");
|
||||
|
||||
if (index < count - 1)
|
||||
description += ",\n";
|
||||
else
|
||||
description += "\n";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user