Shopify / erb-lint

Lint your ERB or HTML files
MIT License
592 stars 113 forks source link

Detect instance variable in partial without leading whitespace #341

Open omarkhan opened 5 months ago

omarkhan commented 5 months ago

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.