View Single Post
Old 01-27-2023, 03:32 PM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,958
Karma: 6361444
Join Date: Nov 2009
Device: many
Okay it seems the old sigil_bs4 code used "sorted()" when accessing attribute key, value pairs to help keep stability of attribute order before python moved to dictionaries being ordered by default.

Now that python has made that move, removal of the "sorted()" method should help maintain input attribute order as long as the underlying parser (lxml) maintains that order.

I have pushed this change to master. It will appear in the next release.

That said, anything that relies on xml attribute order is very broken according to the spec. We only try to maintain the order so that Checkpoint diffs are not cluttered by meaningless changes.

Last edited by KevinH; 01-27-2023 at 03:51 PM.
KevinH is online now   Reply With Quote