Comments (8)
I think the problem is already fixed with version 3.0.0 (take a look at the tests -> https://travis-ci.org/voku/HtmlMin/builds/323025901), but you need to update "voku/simple_html_dom" >= 4.1.3. With version 3.0.1 we will now force this vendor update.
from htmlmin.
It seems I was using 4.1.3.
- Removing voku/portable-utf8 (4.0.1)
- Updating voku/simple_html_dom (4.0.1 => 4.1.3): Downloading (100%)
- Updating voku/html-min (2.0.4 => 3.0.0): Downloading (100%)
from htmlmin.
Your example is added as unit-test and it is ok 👌 at Travis CI (php 7.0 - 7.2) and also on my local system (Ubuntu + php 7.0.x).
If it's still a problem for you, maybe you can detect your current libxml2 version? Because this library is used by php for dom interactions.
from htmlmin.
Whitespace before anchors are definitely being removed.
Before
<span>foo</span> <span>bar</span> <a>baz</a> <a>bat</a>
After
<span>foo</span> <span>bar</span><a>baz</a><a>bat</a>
Note that the foo
span is needed for the space to be deleted before the baz
tag. Maybe the presence of this extra tag is breaking some special-casing code. Since there is whitespace before each of the <a>
tags in the source there should still be a single whitespace before each of the output tags.
Using
voku/html-min
: 3.0.1voku/simple_html_dom
: 4.1.3
from htmlmin.
Why closed?
from htmlmin.
I added tests (28 Jan) that passed on travis-ci and on my local laptop, so I can't fix a test that did not fail :/ ... or did I miss something in the test?!
from htmlmin.
from htmlmin.
I'm still experiencing this issue!
from htmlmin.
Related Issues (20)
- Twig extension doesn't work since Twig 3.9.0
- Incorrect processing before and after<nocompress> tag HOT 1
- <p> paragraphs break when compressing, closing tag missing HOT 7
- Whitespace/ommited tags fidelity issue + headless browser testing proposal
- Remove data attributes in tag
- Remove new lines in script type=application/ld+json
- More issues with <code> and <p> HOT 1
- Minify inline Javascript
- PRCE error handling HOT 5
- how to pass html & from where HOT 1
- Dependency Dashboard
- Escaping issues with Mustache.js templates HOT 2
- `doMakeSameDomainsLinksRelative` somewhat counter-intuitive
- Broken minification (`ParseError`)
- Unexpected whitespace removal before anchor tag
- Broken script template tags HOT 2
- Doesn't work in php 8 or greater due to namespaces not being Capitalized
- `sizes` and `srcset` value are not trim...
- Uncaught TypeError with PHP 8.3 and `id` attribute HOT 4
- removing end head tag </head> from file...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlmin.