Skip to content

Remove nested push from template expansion - #34064

Open
luojiyin1987 wants to merge 1 commit into
uBlockOrigin:masterfrom
luojiyin1987:agent/fix-template-nested-push
Open

Remove nested push from template expansion#34064
luojiyin1987 wants to merge 1 commit into
uBlockOrigin:masterfrom
luojiyin1987:agent/fix-template-nested-push

Conversation

@luojiyin1987

Copy link
Copy Markdown

Fixes #34063.

Summary

The template expansion now adds the file marker directly.
It no longer adds the return value from a nested push call.

Root cause

Array.push returns the new array length.
The nested call added that number to the parts array.
The assemble function ignored the number because it only uses strings.

Impact

The intermediate parts array now contains only intended values.
The file marker, banner, and file content keep their original order.
Generated output stays unchanged.

Checks

  • node --check tools/make-easylist.mjs
  • git diff --check
  • Generated all seven ublock templates before and after the change.
  • Compared 3,626,613 generated bytes.
  • Every output file was byte-identical.

@luojiyin1987
luojiyin1987 marked this pull request as ready for review August 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove nested push from template expansion

1 participant