Skip to content

Conversation

@gabritto
Copy link
Member

Fixes misported regex. Noticed in #2333 (comment).

Copilot AI review requested due to automatic review settings December 11, 2025 02:17
@gabritto gabritto marked this pull request as draft December 11, 2025 02:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a regex misport in the UnquoteString function. The original regex incorrectly matched all dot characters (.) instead of escape sequences (backslash followed by any character \.). This caused string literals containing dots to be incorrectly transformed, e.g., "1.0" became "10".

Key Changes:

  • Fixed regex pattern from \. to \\. to properly match backslash-escaped characters
  • Updated 30+ test baselines showing corrected string property name handling

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/stringutil/util.go Fixed regex pattern to match \. (backslash + any char) instead of . (just dot)
testdata/baselines/reference/submodule/conformance/*.symbols Updated baselines showing dots in property names are now preserved correctly (e.g., "1.0" instead of "10")
testdata/baselines/reference/submodule/conformance/*.symbols.diff Several diff files removed or reduced, indicating convergence with TypeScript reference behavior
testdata/baselines/reference/submodule/compiler/*.symbols Updated baselines for compiler tests with numeric property names containing dots
testdata/baselines/reference/submodule/compiler/*.symbols.diff Diff files removed, showing alignment with expected TypeScript behavior

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this even a regex? 😄

@gabritto gabritto marked this pull request as ready for review December 11, 2025 16:34
@gabritto gabritto added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit d38f992 Dec 11, 2025
28 checks passed
@gabritto gabritto deleted the gabritto/fix_unquote branch December 11, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants