Re: Sandbox proposal: Markup for templating
Matthew Good <trac <at> matt-good.net>
2006-08-02 16:17:09 GMT
On Wed, 2006-08-02 at 16:24 +0200, Emmanuel Blot wrote:
> > So, does anyone have any objections about this plan?
>
> Nope.
> I have a couple of questions though:
>
> 1. Do you have any idea/estimation about when the trunk will switch
> from Clearsilver to Markup (it takes quite a time to update the french
> translation, so if I can avoid updating it and restart from scratch
> after the switch ...
)
>
> 2. I did not try Markup yet, but I read the documentation, and I
> found one point that sounded weird at first:
> http://markup.edgewall.org/wiki/MarkupTemplates#py:strip
>
> "As a shorthand, if the value of the py:strip attribute is empty, that
> has the same effect as using a truth value (i.e. the element is
> stripped)."
>
> As an empty string in Python means a False value, I found this
> shorthand a bit confusing and error-prone. I guess this choice is on
> purpose, so I think it would be helpful if you could give some details
> about this specific point.
This is a carry-over from Kid which has worked well. It doesn't mean
that the attribute contains an empty string, but that it actually
contains no expression. So, py:strip="''" is actually an "empty
string", which is False so the tag would not be stripped. However
py:strip="" contains no expression, so it's a special case where it is
stripped since there is no expression to check. Of course there's not
(Continue reading)