SVG from XML: inlineSize in <tspan ...> is ignored because xml parser wraps TSpan in TSpan #2206
Labels
Close when stale
This issue is going to be closed when there is no activity for a while
Missing repro
This issue need minimum repro scenario
Bug
When creating a SVG from xml via:
The tspan attribute inline-size is ignored.
When using JSX, the linebreak works :
I traced it back to
react-native-svg/src/lib/extract/extractText.tsx
Lines 174 to 183 in ff18553
...
react-native-svg/src/lib/extract/extractText.tsx
Lines 139 to 145 in ff18553
which wraps text components in a new TSpan, which does not forward the inlineSize.
My workaround is the following diff:
I would probably make sense to detect that the currently processed item is already a TSpan and not to wrap it in another TSpan.
The text was updated successfully, but these errors were encountered: