You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description
When formatting a string with multiple usages of the same component in the same scope, formatElements only considers the outermost opening and closing tags
To Reproduce
Use a Trans tag like <Trans id="<0>Superscript</0> regular <0>super</0>" components=[{<sup />}] />, observe rendered HTML is <sup>Superscript</0> regular <0>super</sup>
it("should format multiple usages of same element in the same scope",function(){expect(html(formatElements("<0>First</0> second <0>third</0> <0>fourth</0>",[<sup/>]))).toEqual(wrap("<sup>First</sup> second <sup>third</sup> <sup>fourth</sup>"))})
Expected behavior
The formatter should correctly replace multiple instances of the same component
jsLingui version 2.8.3
Babel version 6.26.3
This issue affects a project created with simple-react-app, but also affects Lingui's master
The text was updated successfully, but these errors were encountered:
Bug Description
When formatting a string with multiple usages of the same component in the same scope,
formatElements
only considers the outermost opening and closing tagsTo Reproduce
Use a Trans tag like
<Trans id="<0>Superscript</0> regular <0>super</0>" components=[{<sup />}] />
, observe rendered HTML is<sup>Superscript</0> regular <0>super</sup>
Expected behavior
The formatter should correctly replace multiple instances of the same component
2.8.3
6.26.3
master
The text was updated successfully, but these errors were encountered: