Skip to content

fix: escape delimiter characters in the formatting regexp - #111

Open
LucasLeao18 wants to merge 1 commit into
d3:mainfrom
LucasLeao18:fix/escape-format-delimiter
Open

LucasLeao18 wants to merge 1 commit into
d3:mainfrom
LucasLeao18:fix/escape-format-delimiter

Conversation

@LucasLeao18

Copy link
Copy Markdown

Delimiter characters are interpolated directly into a regular-expression character class. Using ] or backslash can omit required quotes; using - can throw an invalid range error. Escape character-class metacharacters before building the formatter expression.

Regression tests round-trip rows and objects with ], backslash, -, and ^ delimiters, including newline and quote values.

Validation (Node.js 24.15.0, Windows): The new tests fail before the fix for ], backslash, and -. Full Mocha suite: 140 passing (TZ=America/Los_Angeles); ESLint on src and test passes.

AI assistance: this contribution was prepared with OpenAI Codex; the change and regression results were reviewed before submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant