Add alternate array index style, with setting

This commit is contained in:
2024-10-07 00:58:34 +02:00
parent 0e1354bd47
commit 73ac4dd3f6
3 changed files with 13 additions and 2 deletions

View File

@@ -195,7 +195,11 @@ class TreeList implements Countable, IteratorAggregate
}." ";
}
echo (is_int($entry->key)
?"\e[36;2m\u{e0b6}\e[7m#{$entry->key}\e[27m\u{e0b4}\e[22;37m "
?(Settings::$highlightIndices
?"\e[36;2m\u{e0b6}\e[7m#{$entry->key}\e[27m\u{e0b4}\e[22;37m "
:"\e[36;2m#{$entry->key}\e[22;37m "
)
:(Settings::$editorQuotedKeys
? "\e[36m\"{$entry->key}\":\e[37m "
: "\e[36m{$entry->key}:\e[37m "