Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting javascript_tag #72

Open
tonywok opened this issue Oct 4, 2022 · 0 comments
Open

Formatting javascript_tag #72

tonywok opened this issue Oct 4, 2022 · 0 comments

Comments

@tonywok
Copy link

tonywok commented Oct 4, 2022

I'm working in an app that has a handful of inline script tags. During the process of configuring our content security policy to apply a nonce to these inline scrips, I replaced the raw <script> with a javascript_tag(nonce: true) do ... end.

This seems to confuse htmlbeautfier. It's removing all leading whitespace from the contents of the javascript_tag block.

Ideally it would just ignore this content --- or perhaps even offer an optional html comment to enable/disable the beautifier for a certain code blocks?

Thank you!

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

No branches or pull requests

1 participant