Skip to content

Comments

Detect instance variable in partial without leading whitespace#341

Open
omarkhan wants to merge 1 commit intoShopify:mainfrom
omarkhan:partial-instance-variable
Open

Detect instance variable in partial without leading whitespace#341
omarkhan wants to merge 1 commit intoShopify:mainfrom
omarkhan:partial-instance-variable

Conversation

@omarkhan
Copy link

@omarkhan omarkhan commented Jan 31, 2024

The regex used to detect an instance variable in a partial currently misses instance variables that are not immediately preceded by whitespace, as in this example:

<%= link_to(project.name, [@project_developer, project]) %>

This modifies the regex to detect such cases, and adds a test.

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