tink_hxx icon indicating copy to clipboard operation
tink_hxx copied to clipboard

Conditional compilation

Open kevinresol opened this issue 7 years ago • 2 comments

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>

kevinresol avatar Jun 22 '18 07:06 kevinresol

I thought the following will work with inline markup, but it doesn't

<div>
  {#if value <input/> #end}
</div>

Failing with Invalid expression

kevinresol avatar Mar 26 '19 16:03 kevinresol

Oh. That actually should compile, since hxx will pass the whole #if value <input/> #end to Context.parseInlineString.

back2dos avatar Mar 26 '19 18:03 back2dos