[subbu@earth lib] echo "{{echo|[[Foo]]}}l" | node parse --wt2wt
{{echo|[[Foo]]}}
The wt2wt of that snippet is clearly losing the linktrail from source wikitext. This seems to be because the linktrail/linkprefix DOM pass that runs late in the DOM post-processing stage doesn't update data-mw of the transclusion to include info about the linktrail. See below.
[subbu@earth lib] echo "{{echo|[[Foo]]}}l" | node parse --dump dom:post-encap | & sed "s/"/'/g;"
- DOM: post-encapsulation -------
<head data-parsoid="{'tmp':{}}"></head><body data-parsoid="{'tmp':{},'dsr':[0,18,0,0]}"><p data-parsoid="{'tagId':1,'tmp':{},'dsr':[0,17,0,0]}"><a rel="mw:WikiLink" href="./Foo" about="#mwt1" typeof="mw:Transclusion" data-mw="{'parts':[{'template':{'target':{'wt':'echo','href':'./Template:Echo'},'params':{'1':{'wt':'[[Foo]]'}},'i':0}}]}" data-parsoid="{'stx':'simple','a':{'href':'./Foo'},'sa':{'href':'Foo'},'tagId':3,'tmp':{},'dsr':[0,16,null,null],'src':'{{echo|[[Foo]]}}','pi':[[{'k':'1','spc':['','','','']}]]}">Foo</a>l</p>
</body>
<body data-parsoid='{"dsr":[0,18,0,0]}'><p data-parsoid='{"dsr":[0,17,0,0]}'><a rel="mw:WikiLink" href="./Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}}]}' data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"Foo"},"dsr":[0,17,null,1],"pi":[[{"k":"1","spc":["","","",""]}]],"tail":"l"}'>Fool</a></p>
</body>
Version: unspecified
Severity: normal