Configurable per-depth separators for nested array cells#12
Merged
Conversation
Agent-Logs-Url: https://github.com/ChronosGames/DataTables/sessions/ef9b3657-859c-4263-9f9f-eef87104bf1c Co-authored-by: 0x5143 <5179057+0x5143@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
0x5143
May 18, 2026 11:59
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The plain-text array parser preferred
|and otherwise fell back to#, makingid#count|id#countand a single801000#2parse with different rules — the latter being silently split into[[801000],[2]]instead of[[801000, 2]]. There was no way to model nested arrays unambiguously.Changes
ParseOptions.ArrayNestedSeparators: new string option where the N-th character is the delimiter for the N-th array nesting level (e.g."|#-"→ depth-1|, depth-2#, depth-3-). Empty preserves legacy|/#priority behavior.ArrayDataProcessor:WriteDelimitedToStreamnow picks the separator by current depth and recurses with a[ThreadStatic]depth counter incremented around inner-array element writes. When the configured string is shorter than the current depth, the last character is reused.DataTables.Generator): adds--arrayNestedSeparatorsto bothExportAllandExportOne, plumbed throughParseOptions.DataTableProcessor: appliesParseOptions.ArrayNestedSeparatorsto the static config at construction; empty/null normalizes to legacy mode.ArrayNestedSeparatorsTestscovers the singleton case, multi-entry, triple-nested, separator overflow reuse, and the empty-config fallback.Example
With
array<array<int>>:1#2|3#4[[1,2],[3,4]](by accident)[[1,2],[3,4]]801000#2[[801000],[2]]❌[[801000,2]]✅