You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Getting the error Syntax error: unexpected token tSTRING when rendering two partials one after another in a view.
To Reproduce
Reference two different partials one after another, eg: <%= render "gsd/projects/states/dates", state: %> <%= render "gsd/projects/states/state_dates", state: %>
Expected Behaviour
It should be a valid statement.
Screenshots
Take a look at this PR and the pipeline errors
Version Information
Packwerk: [e.g. v2.2.2]
Ruby [e.g. v3.1.2p20]
Additional Context
How have you tried to solve the issue? The way to bypass the error was to use quotes for the first render <%= render("gsd/projects/states/dates", state:) %> <%= render "gsd/projects/states/state_dates", state: %>
The text was updated successfully, but these errors were encountered:
Would you like to try to put up a PR to resolve this? I'd be happy to help.
A good place to start would be going into test/unit/packwerk/parsers/erb_test.rb and adding a test that fails for your valid ERB. Then we can dive into what it would take to fix.
Description
Getting the error
Syntax error: unexpected token tSTRING
when rendering two partials one after another in a view.To Reproduce
Reference two different partials one after another, eg:
<%= render "gsd/projects/states/dates", state: %> <%= render "gsd/projects/states/state_dates", state: %>
Expected Behaviour
It should be a valid statement.
Screenshots
Take a look at this PR and the pipeline errors
Version Information
Additional Context
How have you tried to solve the issue? The way to bypass the error was to use quotes for the first render
<%= render("gsd/projects/states/dates", state:) %> <%= render "gsd/projects/states/state_dates", state: %>
The text was updated successfully, but these errors were encountered: