-
-
Notifications
You must be signed in to change notification settings - Fork 1
nested variable assignment not working #4
Copy link
Copy link
Open
Labels
Description
:each image in getCollection('galleryimages').toJSON()
.col-md-4
%h3= image.heading
:if image.gallery == 'landing'
%p= image.image
- var test = image.urlThe variable assignmentin the last line - var test = image.url breaks the generation.
docpad itself does not report an error, yet in the generated HTML, this error message is shown:
SyntaxError: Unexpected token ;
at Function.<anonymous> (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad-plugin-haml/node_modules/haml/lib/haml.js:595:29)
at execute (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad-plugin-haml/node_modules/haml/lib/haml.js:602:8)
at Function.render (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad-plugin-haml/node_modules/haml/lib/haml.js:587:12)
at HamlPlugin.render (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad-plugin-haml/out/haml.plugin.js:22:29)
at ambi (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:55:18)
at Task.<anonymous> (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad/node_modules/event-emitter-grouped/out/lib/event-emitter-grouped.js:45:23)
at ambi (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:55:18)
at fire (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:384:27)
at b (domain.js:183:18)
at Domain.run (domain.js:123:23)
at Task.fire (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:398:25)
at Object._onImmediate (/Users/volker/Documents/20_coding/01_projects/kohchanginfo/html/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:414:26)
at processImmediate [as _immediateCallback] (timers.js:336:15)
When removig the last line, html is generated correctly.
not indenting the variable definition line will execute, but not as part of the :if or :each clauses.
Reactions are currently unavailable