Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@souravagrawal29
Copy link
Contributor

@souravagrawal29 souravagrawal29 commented Sep 27, 2025

This PR closes #5336

What's changed

  • Environment variable placeholders now accept dots in names (e.g., <<api.v1.key>>), improving compatibility with namespaced variables.
  • Extracted the ENV_VAR_PATTERN to a common variable.
Screenshot 2025-09-27 at 7 39 48 PM

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 environment variable highlighting to support dots in variable names, addressing issue #5336. It enables namespaced variable patterns like <<api.v1.key>> by updating the regex pattern and extracting it to a reusable constant.

  • Updated environment variable regex pattern to include dots for namespaced variables
  • Extracted the pattern to a common constant ENV_VAR_NAME_PATTERN for better maintainability
  • Updated cursor tooltip field logic to use the new pattern consistently

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nivedin nivedin force-pushed the fix-env-dot-highlight/#5336 branch from 1ca8ef5 to 218bdc1 Compare September 29, 2025 07:13
@nivedin nivedin changed the base branch from main to next September 29, 2025 07:13
@nivedin nivedin requested a review from Copilot September 29, 2025 07:13
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <[email protected]>
@nivedin nivedin requested a review from Copilot September 29, 2025 07:16
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nivedin nivedin changed the title Fix env dot highlight/#5336 fix: highlight environment on string containing dot Sep 29, 2025
@jamesgeorge007 jamesgeorge007 merged commit 5039a14 into hoppscotch:next Sep 29, 2025
1 check passed
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.

[bug]: No color highlight of variables with dot (.) in the name

3 participants