Shinmera / plump

Practically Lenient and Unimpressive Markup Parser for Common Lisp
https://shinmera.github.io/plump
zlib License
120 stars 21 forks source link

get-elements-by-tag-name: Preserve child order #46

Closed samuel-hunter closed 2 years ago

samuel-hunter commented 2 years ago

The current algorithm for get-elements-by-tag-name pushes each matching element into the top of an accumulation list. This reverses the order of children by nature, producing "surprising" behavior for anyone who assumes order is preserved.

This commit "fixes" this surprise by reversing the accumulation list back to original order on return.