How to enforce double quotes on HTML attributes in .erb files?

Hi,

I would like to be able to use the Reformat Code feature to enforce consistent use of double quotes on HTML element attributes (eg. class='foo' would become class="foo") in .html.erb files. I can do this if I rename the file temporarily to .html and use the "Generated quote marks" + "Enforce on format" options in the HTML code style, and then rename it back to .erb but this isn't very convenient. It would be better if the .html code style was applied first and then overridden by the .erb code style.

Is there any way I can achieve the above without renaming the file?

Many thanks,

Craig.

 

Please sign in to leave a comment.