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

Minification breaks inline SVG #6475

Closed
Arty2 opened this issue Nov 3, 2019 · 1 comment
Closed

Minification breaks inline SVG #6475

Arty2 opened this issue Nov 3, 2019 · 1 comment
Labels
Milestone

Comments

@Arty2
Copy link

@Arty2 Arty2 commented Nov 3, 2019

An inline SVG is modified (and broken) by the minifier.
See the following after .005-.372:

Original:

<svg xmlns="http://www.w3.org/2000/svg" height="0.8rem" viewBox="0 0 3.375 2.912"><path stroke-width="0" d="M.166.1L.1.63s.417.054 1.355.063c.01.22.018.471.018.797 0 .056-.002.08-.003.132h-.397l.002-.133c0-.144-.003-.252-.005-.372a16.062 16.062 0 01-.53-.023c.003.128.006.246.006.396 0 .738-.03 1.123-.05 1.322.139-.01.32-.017.539-.023.011-.138.022-.358.03-.637h.395c-.01.286-.024.508-.035.63l.263-.002c.106 0 .178.003.273.004.019-.23.04-.592.04-1.294 0-.335-.007-.582-.015-.798.135-.002.282-.003.394-.006.01.221.018.475.018.804 0 .72-.028 1.096-.047 1.3.217.005.397.013.534.022.02-.23.043-.598.043-1.322 0-.35-.008-.606-.017-.828.245-.016.364-.032.364-.032L3.209.1s-.53.066-1.521.066C.696.167.166.1.166.1z"/></svg>

Minified:

<svg xmlns="http://www.w3.org/2000/svg" height=".8rem" viewBox="0 0 3.375 2.912"><path stroke-width="0" d="M.166.1.1.63s.417.054 1.355.063c.01.22.018.471.018.797.0.056-.002.08-.003.132h-.397l.002-.133c0-.144-.003-.252-.005-.372.003.128.006.246.006.396.0.738-.03 1.123-.05 1.322.139-.01.32-.017.539-.023.011-.138.022-.358.03-.637h.395c-.01.286-.024.508-.035.63l.263-.002c.106.0.178.003.273.004.019-.23.04-.592.04-1.294.0-.335-.007-.582-.015-.798.135-.002.282-.003.394-.006.01.221.018.475.018.804.0.72-.028 1.096-.047 1.3.217.005.397.013.534.022.02-.23.043-.598.043-1.322.0-.35-.008-.606-.017-.828.245-.016.364-.032.364-.032L3.209.1s-.53.066-1.521.066C.696.167.166.1.166.1z"></path></svg>

What version of Hugo are you using (hugo version)?

Hugo Static Site Generator v0.59.1-D5DAB232 windows/amd64 BuildDate: 2019-10-31T15:22:43Z

Does this issue reproduce with the latest release?

Yes (it is the latest)

@anthonyfok

This comment has been minimized.

Copy link
Contributor

@anthonyfok anthonyfok commented Nov 5, 2019

Hi @Arty2, thank you for your report!

This looks to be an issue with the "minify" library that we use, and I have forwarded your report to tdewolff/minify#269, so please follow that issue there too.

If you were to experience any other issues related to minification, it would be great if you could create an issue at https://github.com/tdewolff/minify/issues which is closer to where it needs to be fixed.

Thanks!

@bep bep added this to the v0.60.1 milestone Nov 29, 2019
@bep bep closed this in 86a5b59 Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.