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

Bug: translate="no" is minified incorrectly #352

Closed
coliff opened this issue Nov 17, 2020 · 1 comment
Closed

Bug: translate="no" is minified incorrectly #352

coliff opened this issue Nov 17, 2020 · 1 comment

Comments

@coliff
Copy link

coliff commented Nov 17, 2020

Hi. I think I found a bug. With Hugo 0.78.2 and minify HTML option enabled (default minification settings), it minifies the following:

<h1 translate="no">Navigation</h1>

to:

<h1 translate>Navigation</h1>

which doesn't work as expected. Translate="no" is a HTML5 attribute and is used on the new Safari to tell the browser not to auto-translate a particular div/span etc. - useful for product/brand names etc.
REF: https://html.spec.whatwg.org/multipage/dom.html#the-translate-attribute

I hope this could be fixed so that it'd be minified to:

<h1 translate=no>Navigation</h1>
@tdewolff
Copy link
Owner

Thanks! This should be fixed, please let me know if you still run into trouble.

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

2 participants