``spaceless`` is useless here as it will only remove spaces between ``>`` and ``<`` (to remove spaces between tags), whcih means it will not remove anything here.

What you may want to use is the whitespace control (like you did for the ``{% if %}`` tag above