otherjoel / beeswax

🐝🧇 Prototype template #lang for Pollen
Other
11 stars 0 forks source link

Calls to `current-metas` and `current-pagetree` always return false during a `define`-like expression #16

Closed otherjoel closed 3 years ago

otherjoel commented 3 years ago

Any defines in a Beeswax template get moved to the top of the apply-template function that Beeswax wraps around the template. It so happens that the place they get put is outside the scope of the parameterize that sets the value of the current-pagetree and current-metas. (See these lines in the expander.) So any definitions that depend, directly or indirectly, on those two parameters will receive incorrect values.

Surfaced by @benknoble in follow-up for #12.