echo '#redirect [[Category:Foo]]' | node parse --wt2wt | node parse --wt2wt
#redirect [[Category:Foo]][[Category:Foo]][[Category:Foo]]
It seems that the necessary special-case handing in the serializer is missing. If we assume that editors never insert categories in the middle of the DOM (currently true) then it should be safe to check for the previousSibling of the category link, and avoid serializing it if that is a redirect with the same target.
Version: unspecified
Severity: normal