Dan Brendstrup
unread,Nov 14, 2009, 9:23:23 AM11/14/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Haml
Hi,
Is there any way to define tags for the :autoclose option with a
regex? I'm trying to use Haml as a preprocessor for Textpattern
templates, and Textpattern uses XML-style templating tags such as
<txp:site_name />, <txp:author /> etc.
Unless they contain statements and therefore function as "container
tags", all Textpattern tags must be self-closed, so to avoid ending
each Haml-tag with a forward slash, it'd be great to be able to
specify that all tags beginning with "txp:" should be self-closed.
Is this possible, or does :autoclose simply parse a static array?
Due to the plugin nature of Textpattern, the number of txp-tags is
potentially infite, so listing them all in an array is unfortunately
impossible.
Thanks for any help!
- Dan
(And for anyone interested: Aside form the above niggle, because Haml
is tag-agnostic it is a perfect fit for Textpattern pre-processing.
I'm experimenting with nanoc for pre-processing templates, and pulling
them in with the cnk_versioning Textpattern-plugin, and it friggin'
rocks.)