Rootbuzz / shpaml

Load shpaml (haml-like html alternative) templates in django seamlessly. Should work fine extending normal HTML templates and being extended by them.
http://shpaml.com
BSD 3-Clause "New" or "Revised" License
46 stars 9 forks source link

Introduce TIGHT word to output HTML without spaces #16

Open cool-RR opened 9 years ago

cool-RR commented 9 years ago

This is an issue to track the feature I suggested here:

https://groups.google.com/forum/#!topic/shpaml/EN6n6PN8_b0

I find myself needing this again. I don't think I'll implement this soon, but I want to keep this issue open in case someone (me or someone else) will want to implement in the future.

The feature:

Sometimes I want to generate HTML like this using Shpaml:

<a href='whatever'>Hello</a>, world!

The point is that there are no spaces inside the a tag, this is important so there wouldn't be a space before the comma, which would look ugly.

Currently it seems that the only way to do this in Shpaml is to include raw HTML. This works, but having Shpaml syntax for it would be better.

I suggest a keyword TIGHT (or some other similar word) similar to VERBATIM which will cause all sub-tags to contain no space between them.