Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update designer json-to-js regex to allow keys with dot notation #17287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jacksonopp
Copy link

@jacksonopp jacksonopp commented Jan 3, 2025

Defect Fixes

Fixes issue #17285

Explanation of Changes

  1. Lookahead (?!...):

    • (?!\w+\.\d+) ensures the key does not match the pattern word.number (e.g., color.1).
    • \w+: Matches one or more word characters (letters, digits, or underscores).
    • \.: Matches a literal period (.).
    • \d+: Matches one or more digits.
  2. Adjusted Capturing Group:

    • ((?!\w+\.\d+)[^"]+):
      • Captures keys that do not match the \w+.\d+ pattern.
      • Ensures only valid keys are captured and replaced.
  3. Replacement:

    • $1: retains the captured group (key) and appends the colon.

Copy link

vercel bot commented Jan 3, 2025

@jacksonopp is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant