-
Notifications
You must be signed in to change notification settings - Fork 3
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
White spaces removed after <span>, <a>, <b>, etc #4
Comments
Thank you for feedback! Can you specify more information? Hmm. It may be because of https://github.com/xfenix/django-hmin/blob/master/hmin/base.py#L15 bad regular expression, where i lost closing slash exclusion (so it intents to do no harm, suppose to clean spaces after open tags, not closing). I may patch it up with more clever regexp, because it obviously a bug. |
Yeap, i found that my fixtures all filled with this behaviour. No doubt — it is bug. |
I found a workaround. I hard installed hmin in my django project and commented out the following in base.py: I do not know if it's a good way though. |
…tion middleware, light refactoring. Regress test addded.
In those case you get some extra spaces, but it was legit for situation. Now i fixed this. You can install new 0.5.4 version, it has no this bug. Also i added python 3.9 tests and slightly optimize middleware. |
Please, let me know, if you experience another issues or this issue will strike back in other scenarios. |
hum, I still have the same issue with the new modifications. I still have to comment out
to make it works, am I missing something? I just modified all the following files by copy pasting your new versions: |
It's better to install from pypi. django-hmin/hmin/tests/helpers.py Line 51 in cfea5eb
If you still have this issue, please provide example (before/after minifcation). Don't forget to clean caches, it may be because of them. |
I'm still having this issue, and I cleaned the caches. I also tried using the Which doesn't work. |
Do you have installed version 0.5.4? |
Thank you for this middleware. It's working better than django-htmlmin regarding per-view caching. However, the minifed code removes the white spaces after some tags (
<span>, <a>, <b>, etc.
).Is there a way to do it in a more clever way so we do not need to hardcode
each time we use such tags?The text was updated successfully, but these errors were encountered: