Swatinem / jade-virtualdom

compile jade templates to virtualdom
22 stars 3 forks source link

Problem with wronldy indented comment #2

Closed bvallant closed 10 years ago

bvallant commented 10 years ago

The if doesn't get properly executed because the following comment is somehow "wrongly" indented:

                if line.objects
                            ul
                                each obj in line.objects
                                    li(class=obj.type)
                                        if obj.sha
                                            a(href=obj.url)= obj.sha 
                                        if obj.name
                                            a(href=obj.url)= obj.name 
                                        if obj.content
                                            .content= obj.content
                                        if obj.summary
                                            .summary= obj.summary
                                        if obj.author && obj.author.username
                                            span.author= obj.author.username
                        //- show the edit stuff only if current user is the author
Swatinem commented 10 years ago

You have

if
3* ul
4* …
2* comment

which is simply invalid jade and the normal jade compiler will throw just as well. Please reopen if this is really an issue.