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

if 语句编译bug #51

Closed
codinl opened this issue Sep 13, 2015 · 1 comment
Closed

if 语句编译bug #51

codinl opened this issue Sep 13, 2015 · 1 comment

Comments

@codinl
Copy link

codinl commented Sep 13, 2015

@if x==0 {class="aaa"}

期望的输出是:
if x == 0 {
_buffer.WriteString("class="aaa"")
}

目前的输出是:
if x == 0 {
class = "aaa"
}

少了 _buffer.WriteString()

@codinl codinl changed the title if if 语句编译bug Sep 13, 2015
@bom-d-van
Copy link
Contributor

You can work around this problem by using a variable:

@if x==0 {
    a = `class="aaa"`
}

<div @a></div>

@Wuvist Wuvist closed this as completed May 2, 2019
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

3 participants