Don't format contents of javascript_tag
method.
#32
Labels
looking for contributions
This issue was accepted and is looking for a pull-request
javascript_tag
method.
#32
In normal usage of
javascript_tag
, the contents of the block are javascript, and not HTML.erb-formatter
attempts to format these contents, which can mangle whitespace and make inline scripts hard to read. Something like...becomes
Note that it mangles the comment and results in malformed code in addition to making it difficult to read.
To complicate things, it is valid to include erb tags within the block. Ideally those tags should still be formatted.
This may apply to other helpers as well.
The text was updated successfully, but these errors were encountered: