I see the problem. It actually saves whitespace before and after but not inside the attribute. example (. replaces whitespace):
>>> from slimmer import html_slimmer >>> html='''<example attribute="....This is....a test...." />''' >>> html_slimmer(html) '<example attribute="....This is a test...." />'
You're right. It is a bug.
However, I can't find the time to work on this now. To begin with, whitespace slimming on HTML is often less important since HTML is often regenerated every time unlike CSS and Javascript which is often more static and needs only to be slimmed once per build.
I've taken note of the bug but not going to commit any time to it now I'm afraid. Thanks for spotting it!
Comment
I see the problem. It actually saves whitespace before and after but not inside the attribute. example (. replaces whitespace):
>>> from slimmer import html_slimmer
>>> html='''<example attribute="....This is....a test...." />'''
>>> html_slimmer(html)
'<example attribute="....This is a test...." />'
You're right. It is a bug.
However, I can't find the time to work on this now. To begin with, whitespace slimming on HTML is often less important since HTML is often regenerated every time unlike CSS and Javascript which is often more static and needs only to be slimmed once per build.
I've taken note of the bug but not going to commit any time to it now I'm afraid. Thanks for spotting it!
Parent comment
Here is an example: