tink_hxx
tink_hxx copied to clipboard
Conditional compilation
Conditional Element
<div>
{#if value}
<input/>
{#end}
</div>
The above results in Unclosed macro at #if
Conditional Attribute
<div
{#if value}
style=""
{#end}
/>
The above results in unexpected { at {#if
Current workaround
<if ${#if value true #else false #end}>
...
</if>
I thought the following will work with inline markup, but it doesn't
<div>
{#if value <input/> #end}
</div>
Failing with Invalid expression
Oh. That actually should compile, since hxx will pass the whole #if value <input/> #end to Context.parseInlineString.