Remove nested push from template expansion #34083
Unanswered
luojiyin1987
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Summary
The expandTemplate function contains a nested Array.push call.
The inner push adds the file marker and returns the new array length.
The outer push then adds that number to the parts array.
The assemble function ignores non-string values.
The extra number does not normally change generated output.
The current structure is still incorrect and obscures the intended item order.
Proposed scope
Validation
A temporary source transformation generated all seven ublock templates before and after the change.
Every generated file was byte-identical.
The comparison covered about 3.4 MB of generated data.
All reactions