Skip to content

Custom variable: support newline separated options #1191

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

Merged
merged 3 commits into from
Jul 24, 2025

Conversation

domasx2
Copy link
Contributor

@domasx2 domasx2 commented Jul 23, 2025

It was pointed out (as a bug) that custom variable does not properly recognize options separated with new line, like so:

label-1 : value-1,
label-2 : value-2,
label-3 : value-3,

Seems easy enough to fix

@domasx2 domasx2 requested a review from Copilot July 23, 2025 10:34
Copilot

This comment was marked as outdated.

@domasx2 domasx2 requested a review from Copilot July 23, 2025 10:36
Copy link
Contributor

@Copilot 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 bug where custom variables with newline-separated options were not properly parsed. The fix modifies the regex pattern to optionally match newlines at the beginning of option strings.

  • Updates regex pattern to handle optional newlines in custom variable parsing
  • Adds comprehensive test coverage for newline-separated options

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
CustomVariable.tsx Modified regex pattern to optionally match newlines at the start of option strings
CustomVariable.test.ts Added test case to verify newline-separated options are parsed correctly

Copy link
Collaborator

@ivanortegaalba ivanortegaalba left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this! 💯

@ivanortegaalba ivanortegaalba added patch Increment the patch version when merged release Create a release when this pr is merged labels Jul 23, 2025
@domasx2 domasx2 merged commit d6d485c into main Jul 24, 2025
10 checks passed
@domasx2 domasx2 deleted the domas-scenes-custom-var-support-newlines branch July 24, 2025 07:15
@scenes-repo-bot-access-token
Copy link

🚀 PR was released in v6.28.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants