HTML comment before and after a block

38 views
Skip to first unread message

Jej

unread,
Oct 27, 2009, 7:32:22 PM10/27/09
to Haml

Hi all,

In haml:

/ Header
#header
...

renders in html:

<!-- Header -->
<div id='header'>
...
</div>

I wonder if it's possible to automatically add a closing comment to
the block, in this way:

<!-- Header -->
<div id='header'>
...
</div>
<!-- End of Header -->


Maybe a feature request...

It could be:

// Header
#header
...

or

/ Header
#header
...
/

Any idea?

Read you,
Jej

Nathan Weizenbaum

unread,
Oct 27, 2009, 11:16:30 PM10/27/09
to ha...@googlegroups.com
There's no such feature, nor is there likely to be in core. It would make a fine plugin, though.

Jej

unread,
Oct 28, 2009, 5:50:32 AM10/28/09
to Haml

Is there some doc about extending haml, a howto ? Cannot find sharp
information.

Jej

Nathan Weizenbaum

unread,
Oct 28, 2009, 4:06:26 PM10/28/09
to ha...@googlegroups.com
There isn't any concrete plugin/extension interface. You'll have to do some monkeypatching of the Haml::Precompiler code, which you'll need to read (or at least skim) in order to get a good understanding.

Jej

unread,
Oct 29, 2009, 4:59:28 AM10/29/09
to Haml


Ok, thanks.

I will have a glipse on the code, but I think I will leave the task
for someone interested in this feature :)

Jej


On 28 oct, 21:06, Nathan Weizenbaum <nex...@gmail.com> wrote:
> There isn't any concrete plugin/extension interface. You'll have to do some
> monkeypatching of the Haml::Precompiler code, which you'll need to read (or
> at least skim) in order to get a good understanding.
>
Reply all
Reply to author
Forward
0 new messages