Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HTML: whitespace between pre tags not preserved when it contains tags #82
Upon further examination, it seems that tags inside the
I'm using Hugo, which in turn uses Pygments to add syntax highlighting to code snippets. It creates structures like this:
Minify correctly preserves the linebreaks but it strips the whitespace from
If there are no other tags inside the
As a side note, I tried something like this:
The result was the same as with
I'd be happy to help you with this but I'm afraid I'm not familiar enough with Go to do so.
changed the title from
Needs an option to keep whitespace between pre tags as it is
HTML: whitespace between pre tags not preserved when it contains tags
Jul 20, 2016
I'm sorry to bump an old thread, i'm still facing this issue in latest version
This is before minify
and this is after minify
I'm using hugo with pygment syntax highlight, can you help me?
I'm not sure what goes wrong. The CLI tool works correctly, if I add a test case it works correctly but if I run it through the online tool I get all the spaces stripped like you describe.
Can you make sure you have updated github.com/tdewolff/parse and github.com/tdewolff/minify correctly?
I am also having this issue. I ran
I'm using binary version in https://bin.equinox.io/c/dhgbqpS8Bvy/minify-stable-linux-amd64.tgz
It appeared that the issue in go.tacodewolff.nl/minify had to do with CSS and is unrelated.
The repository 2.1.0 branch (and master) work fine and don't contain this regression. However, it seems that the binary build at Equinox is not incorporating 7d6ef9e, which makes me wonder if it contains any of the new commits...