[subbu@earth:~/work/wmf/parsoid] echo "|--[[Foo]]" | php bin/parse.php <p data-parsoid='{"dsr":[0,10,0,0]}'>|--<wikilink data-parsoid='{"src":"[[Foo]]","a":{"href":null},"sa":{"href":"Foo"},"dsr":[3,10,null,null]}'></wikilink></p>
This is because the TokenStreamPatcher runs after WikilinkHandler and so after the tr-contents are re-tokenized, it doesn't quite get processed till end of stage 2. This somehow feels like a known bug but something we haven't addressed yet, but this is a blocker for Parsoid Read Views.
Encountered on frwiki:Sauropsida