posthtml / posthtml-extend

Template extending (Jade-like)
MIT License
46 stars 9 forks source link

Locals arrays are concatenated with each other #56

Closed BPanchenko closed 1 year ago

BPanchenko commented 1 year ago

Arrays defined in different locals variables of <extends> are concatenated with each other.

Example:

<extends src="main.html" locals='{ "breadcrumbs": [ "Components", "Button" ] }'>...</extends>
<extends src="main.html" locals='{ "breadcrumbs": [ "Components", "Field" ] }'>...</extends>

Result:

{ "breadcrumbs": [ "Components", "Button", "Components", "Field" ] }

Is this Bug or am I passing arrays incorrectly?