Extend SpaceInHtmlTag to trim values#389
Open
maxjacobson wants to merge 2 commits intoShopify:mainfrom
Open
Conversation
Author
|
I have signed the CLA! |
In our code base, we merged in some code that looked like this: ``` <input type=" button " /> ``` Which ultimately did not work. The browser did not understand this. We wondered if ERB Lint could have caught it. And now here we are. What do we think?
e2ef44f to
ab17af2
Compare
Author
|
Hello! Not sure if anyone has had a chance to look at this one yet. Just commenting with an FYI that I've pushed up another commit, which fixed a bug in the original implementation. Originally this solution would crash on values that had embedded ruby: <div class="<%= foo %>">
</div>Now it is able to run and trim all of these extraneous spaces in our rails app without issue. I'd be happy to answer any questions or take any feedback y'all may have. Thanks for considering this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In our code base, we merged in some code that looked like this:
Which ultimately did not work. The browser did not understand this. We wondered if ERB Lint could have caught it. And now here we are.
What do we think?