Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional compilation #13

Open
kevinresol opened this issue Jun 22, 2018 · 2 comments
Open

Conditional compilation #13

kevinresol opened this issue Jun 22, 2018 · 2 comments

Comments

@kevinresol
Copy link
Member

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
Copy link
Member Author

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

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

Failing with Invalid expression

@back2dos
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants