pugscalate

Scalate Jade multiple includes doesn't work as expected


Partial 1, widget1.jade:

p 1

Partial 2, widget2.jade:

p 2

Layout attempt 1:

- include("widget1.jade")

This renders:

<p>1</p>

Layout attempt 2:

- include("widget2.jade")

This renders:

<p>2</p>

Layout attempt 3:

- include("widget1.jade")

- include("widget2.jade")

Renders:

<p>1</p>
<p>1</p>

Can anybody validate this? Bug?


Solution

  • What version of scalate/OS/configuration you are using?

    On OS X, with Scalate 1.5.3 i've got the following:

    mcbatyuk:scalate bam$ cat view1.jade 
    p 1
    
    
    mcbatyuk:scalate bam$ cat view2.jade
    p 2
    
    mcbatyuk:scalate bam$ cat compound.jade 
    - include("view1.jade")
    
    - include("view2.jade")
    

    Now running the compound template:

    scalate> run compound.jade 
    <p>1</p>
    <p>2</p>
    

    I'm concerned with the fact that running from the command line $ scalate run compound.jade doesn't actually do anything, but that's another story :-)