Skip to content

Conversation

@sambostock
Copy link
Contributor

This adds handling for <%- #, and clarifies that <%#= is just a comment starting with =, as opposed to some special construct.

Original Replacement Notes
<% # <%#
<%= # <%# If the = was there unintentionally, it can be removed.
<%= # <%#= If temporarily commenting out the line, with the intent of restoring it.
<%- # <%-# - affect whitespace, so we it should be kept, even if this is a comment.

This adds handling for `<%- #`, and clarifies that `<%#=` is just a
comment starting with `=`, as opposed to some special construct.

it "reports the suggested fixes" do
expect(subject.first.message).to(include("Bad ERB comment syntax. Should be <%# without a space between."))
expect(subject.last.message).to(include("Bad ERB comment syntax. Should be <%#= without a space between."))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I almost switched this to <%#, but I realized one might just be trying to temporarily comment something out.

 blah blah
-<%= debugging_something %>
+<%#= debugging_something %>
 blah

@sambostock sambostock marked this pull request as draft June 22, 2023 22:57
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